mirror of
https://github.com/jech/galene.git
synced 2024-11-23 00:55:58 +01:00
Fix overflow in AV1 parser.
This commit is contained in:
parent
adf2ace0a4
commit
8bbf9d16d0
1 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,9 @@ func Keyframe(codec string, packet *rtp.Packet) (bool, bool) {
|
||||||
if len(data) <= offset {
|
if len(data) <= offset {
|
||||||
return nil, offset, offset > 0
|
return nil, offset, offset > 0
|
||||||
}
|
}
|
||||||
|
if offset >= 4 {
|
||||||
|
return nil, offset, true
|
||||||
|
}
|
||||||
l := data[offset]
|
l := data[offset]
|
||||||
length |= int(l&0x7f) << (offset * 7)
|
length |= int(l&0x7f) << (offset * 7)
|
||||||
offset++
|
offset++
|
||||||
|
|
Loading…
Reference in a new issue