aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-01 16:32:09 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-03 01:03:29 +0100
commit4b72d5cd6f9341dcafdbc1b9030166aa987b8304 (patch)
tree76508a4ca8f445f6383c6fe518373836df757889
parent46082c2b3f2158ca3a69b7cd2b105cc763e9c3e7 (diff)
downloadffmpeg-4b72d5cd6f9341dcafdbc1b9030166aa987b8304.tar.gz
avcodec/mjpegdec: Fix runtime error: left shift of negative value -511
Fixes: 693/clusterfuzz-testcase-6109776066904064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 69469c5229..2b5adfc61b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1157,7 +1157,7 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
if (s->interlaced && s->bottom_field)
ptr16 += linesize >> 1;
pred &= mask;
- *ptr16= pred + (dc << point_transform);
+ *ptr16= pred + ((unsigned)dc << point_transform);
}
if (++x == h) {
x = 0;