You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avformat/ac4dec: Check remaining space in ac4_probe()
Fixes: CID1538298 Untrusted loop bound Fixes: undefined behavior Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -43,6 +43,8 @@ static int ac4_probe(const AVProbeData *p)
|
|||||||
size += 4;
|
size += 4;
|
||||||
if (buf[1] == 0x41)
|
if (buf[1] == 0x41)
|
||||||
size += 2;
|
size += 2;
|
||||||
|
if (left < size)
|
||||||
|
break;
|
||||||
max_frames++;
|
max_frames++;
|
||||||
left -= size;
|
left -= size;
|
||||||
buf += size;
|
buf += size;
|
||||||
|
|||||||
Reference in New Issue
Block a user