mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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 8754ccd3b3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
253b7829e4
commit
736ef73f9c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user