rtmp: return error in case of extended chunk stream IDs (#2806)

This commit is contained in:
Alessandro Ros 2023-12-14 11:38:47 +01:00 committed by GitHub
parent 1b71d6975a
commit 22414bb38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 4 additions and 20 deletions

View File

@ -293,6 +293,10 @@ func (r *Reader) Read() (*Message, error) {
typ := byt >> 6
chunkStreamID := byt & 0x3F
if chunkStreamID < 2 {
return nil, fmt.Errorf("extended chunk stream IDs are not supported (yet)")
}
rc, ok := r.chunkStreams[chunkStreamID]
if !ok {
rc = &readerChunkStream{mr: r}

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\xe6")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("0000\xf4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("0000\x00\x00000000000000000000000000000000000000000000000000000000\xb0")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("0")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x00000\x00\x00\x04000000000\x800000000\xc0")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\xf0")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000p")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\xb0")

View File

@ -1,2 +0,0 @@
go test fuzz v1
[]byte("\x80")