[FFmpeg-cvslog] avcodec/mjpegdec: Fix runtime error: signed integer overflow: -32767 * 130560 cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Sun Jun 18 17:26:28 EEST 2017
ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Sun May 21 21:49:54 2017 +0200| [a8fb8cd716dfe29a113068f9e3ded58912dcebfb] | committer: Michael Niedermayer
avcodec/mjpegdec: Fix runtime error: signed integer overflow: -32767 * 130560 cannot be represented in type 'int'
Fixes: 1724/clusterfuzz-testcase-minimized-4842395432648704
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 40fa6a2fa2c255293a780a194eecae5df52644a1)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8fb8cd716dfe29a113068f9e3ded58912dcebfb
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index d7ef0067b5..ba0e714f2b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -734,7 +734,7 @@ static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block,
int component, int dc_index,
int16_t *quant_matrix, int Al)
{
- int val;
+ unsigned val;
s->bdsp.clear_block(block);
val = mjpeg_decode_dc(s, dc_index);
if (val == 0xfffff) {
More information about the ffmpeg-cvslog
mailing list