[FFmpeg-cvslog] avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Thu May 4 21:59:56 EEST 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Apr 27 15:10:25 2017 +0200| [a78ae465fda902565ed041d93403e04490b4be0d] | committer: Michael Niedermayer
avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 cannot be represented in type 'int'
Fixes: 943/clusterfuzz-testcase-5114865297391616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a78ae465fda902565ed041d93403e04490b4be0d
---
libavcodec/mjpegdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a86f6b2642..ed381de66a 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -776,7 +776,8 @@ static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block,
uint16_t *quant_matrix,
int ss, int se, int Al, int *EOBRUN)
{
- int code, i, j, level, val, run;
+ int code, i, j, val, run;
+ unsigned level;
if (*EOBRUN) {
(*EOBRUN)--;
More information about the ffmpeg-cvslog
mailing list