mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()
Fixes: signed integer overflow: 32768 + 2147450880 cannot be represented in type 'int' Fixes: 7885/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5298834394578944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
79c6047c36
commit
936f4a2c2e
@ -1078,7 +1078,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
|
||||
return -1;
|
||||
|
||||
left[i] = buffer[mb_x][i] =
|
||||
mask & (pred + (dc * (1 << point_transform)));
|
||||
mask & (pred + (unsigned)(dc * (1 << point_transform)));
|
||||
}
|
||||
|
||||
if (s->restart_interval && !--s->restart_count) {
|
||||
|
Loading…
Reference in New Issue
Block a user