mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/pixlet: Fix shift exponent 4294967268 is too large for 32-bit type 'int'
Fixes: 1336/clusterfuzz-testcase-minimized-4761381930795008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ce551a3925
commit
1f5b6c7e1e
@ -154,7 +154,7 @@ static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int wi
|
||||
state = 120 * (escape + flag) + state - (120 * state >> 8);
|
||||
flag = 0;
|
||||
|
||||
if (state * 4 > 0xFF || i >= size)
|
||||
if (state * 4ULL > 0xFF || i >= size)
|
||||
continue;
|
||||
|
||||
nbits = ((state + 8) >> 5) + (state ? ff_clz(state) : 32) - 24;
|
||||
@ -260,7 +260,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i
|
||||
|
||||
flag = 0;
|
||||
|
||||
if (state * 4 > 0xFF || i >= size)
|
||||
if (state * 4ULL > 0xFF || i >= size)
|
||||
continue;
|
||||
|
||||
pfx = ((state + 8) >> 5) + (state ? ff_clz(state): 32) - 24;
|
||||
|
Loading…
Reference in New Issue
Block a user