diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-18 16:42:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-10 01:33:28 +0200 |
commit | 736ef73f9c04e8c614e56c15d192dd1f194fe721 (patch) | |
tree | 20155f90ab3f65bc8561926ef7b4cae5e77c674e | |
parent | 253b7829e4f547ebd5b95a3154ae2e5b3f200b13 (diff) | |
download | ffmpeg-736ef73f9c04e8c614e56c15d192dd1f194fe721.tar.gz |
avcodec/pixlet: Fixes: undefined shift in av_mod_uintp2()
Fixes: runtime error: shift exponent 4294967289 is too large for 32-bit type 'int'
Fixes: 3030/clusterfuzz-testcase-minimized-4649809254285312
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 8754ccd3b319fdf4e2beed5657a3e327999c64ce)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/pixlet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c index 088226bdda..a9cfe085c9 100644 --- a/libavcodec/pixlet.c +++ b/libavcodec/pixlet.c @@ -262,7 +262,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i flag = 0; - if (state * 4ULL > 0xFF || i >= size) + if ((uint64_t)state > 0xFF / 4 || i >= size) continue; pfx = ((state + 8) >> 5) + (state ? ff_clz(state): 32) - 24; |