Fixes: CID1538298 Untrusted loop bound
Fixes: undefined behavior
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/ac4dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/ac4dec.c b/libavformat/ac4dec.c
index f647f557ccd..dc6638de3a4 100644
--- a/libavformat/ac4dec.c
+++ b/libavformat/ac4dec.c
@@ -43,6 +43,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;
--
2.45.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".