diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-03-05 22:25:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-03-27 13:37:23 +0200 |
commit | 35977631a28ddf62083f4ff5e78a92dbebfd158f (patch) | |
tree | 80a46c88e36bd1efda321b3b2d8c37ecbb21f179 | |
parent | 49872ca447f564506ec5d2f316bb32cdf5f3de1e (diff) | |
download | ffmpeg-35977631a28ddf62083f4ff5e78a92dbebfd158f.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 87ad0a5dd7d12c91badc215c3b5d6745fa7acb02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/escape124.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index ab5c8d2243..51be851869 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)) |