avcodec/mjpegdec: Fix runtime error: signed integer overflow: -32767 * 130560 cannot...
[ffmpeg.git] / libavcodec / mjpegdec.c
index ed381de..5cdb489 100644 (file)
@@ -757,7 +757,7 @@ static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block,
                                  int component, int dc_index,
                                  uint16_t *quant_matrix, int Al)
 {
-    int val;
+    unsigned val;
     s->bdsp.clear_block(block);
     val = mjpeg_decode_dc(s, dc_index);
     if (val == 0xfffff) {