1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 15:25:48 +01:00

Fix overflow in AV1 parser.

This commit is contained in:
Juliusz Chroboczek 2024-04-14 15:11:30 +02:00
parent 9214df7f97
commit c0b755f82f

View file

@ -65,6 +65,9 @@ func Keyframe(codec string, packet *rtp.Packet) (bool, bool) {
if len(data) <= offset {
return nil, offset, offset > 0
}
if offset >= 4 {
return nil, offset, true
}
l := data[offset]
length |= int(l&0x7f) << (offset * 7)
offset++