File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Gabor Pongracz <gabor.pongracz@proemergotech.com>
1212Hugo Arregui <hugo.arregui@gmail.com>
1313Hugo Arregui <hugo@decentraland.org>
1414Juliusz Chroboczek <jch@irif.fr>
15+ Kevin Wang <kevmo314@gmail.com>
1516lllf <littlelightlittlefire@gmail.com>
1617Luke Curley <kixelated@gmail.com>
1718Max Hawkins <maxhawkins@gmail.com>
Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ func (t *TransportLayerCC) Unmarshal(rawPacket []byte) error { //nolint:gocognit
447447 // header's length + payload's length
448448 totalLength := 4 * (t .Header .Length + 1 )
449449
450- if totalLength <= headerLength + packetChunkOffset {
450+ if totalLength < headerLength + packetChunkOffset {
451451 return errPacketTooShort
452452 }
453453
Original file line number Diff line number Diff line change @@ -630,6 +630,31 @@ func TestTransportLayerCC_Unmarshal(t *testing.T) {
630630 },
631631 WantError : nil ,
632632 },
633+ {
634+ Name : "example3" ,
635+ Data : []byte {
636+ 0x8f , 0xcd , 0x0 , 0x4 ,
637+ 0x9a , 0xcb , 0x4 , 0x42 ,
638+ 0x0 , 0x0 , 0x0 , 0x0 ,
639+ 0x0 , 0x0 , 0x0 , 0x0 ,
640+ 0x0 , 0x0 , 0x0 , 0x0 ,
641+ },
642+ Want : TransportLayerCC {
643+ Header : Header {
644+ Padding : false ,
645+ Count : FormatTCC ,
646+ Type : TypeTransportSpecificFeedback ,
647+ Length : 4 ,
648+ },
649+ SenderSSRC : 2596996162 ,
650+ MediaSSRC : 0 ,
651+ BaseSequenceNumber : 0 ,
652+ PacketStatusCount : 0 ,
653+ ReferenceTime : 0 ,
654+ FbPktCount : 0 ,
655+ },
656+ WantError : nil ,
657+ },
633658 } {
634659 test := test
635660 t .Run (test .Name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments