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>
(cherry picked from commit 2f04cb673c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2e632394dd
commit
18193cfadb
1 changed files with 2 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ static int ac4_probe(const AVProbeData *p)
|
|||
size += 4;
|
||||
if (buf[1] == 0x41)
|
||||
size += 2;
|
||||
if (left < size)
|
||||
break;
|
||||
max_frames++;
|
||||
left -= size;
|
||||
buf += size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue