[FFmpeg-cvslog] avcodec/escape124: fix signdness of end of input check

Michael Niedermayer git at videolan.org
Sun Apr 16 01:41:52 EEST 2023


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Mar  5 22:25:04 2023 +0100| [c561d9303902acc25d614d21f57ccf90d5da7325] | committer: Michael Niedermayer

avcodec/escape124: fix signdness of end of input check

Fixes: Timeout
Fixes: 56561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-5560363635834880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 87ad0a5dd7d12c91badc215c3b5d6745fa7acb02)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c561d9303902acc25d614d21f57ccf90d5da7325
---

 libavcodec/escape124.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c
index 94c2a961e6..9332c8d080 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -88,7 +88,7 @@ static CodeBook unpack_codebook(GetBitContext* gb, unsigned depth,
     unsigned i, j;
     CodeBook cb = { 0 };
 
-    if (size >= INT_MAX / 34 || get_bits_left(gb) < size * 34)
+    if (size >= INT_MAX / 34 || get_bits_left(gb) < (int)size * 34)
         return cb;
 
     if (size >= INT_MAX / sizeof(MacroBlock))



More information about the ffmpeg-cvslog mailing list