ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Sat 
Feb 25 01:43:16 2017 +0100| [310d2af319d9113263f75e94f5a1b211c05260b5] | 
committer: Michael Niedermayer

avcodec/pngdec: Fix runtime error: left shift of 152 by 24 places cannot be 
represented in type 'int'

Fixes: 666/clusterfuzz-testcase-6581447227867136

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=310d2af319d9113263f75e94f5a1b211c05260b5
---

 libavcodec/pngdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index c2ea4d2..a4eb6cc 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -796,7 +796,7 @@ static int decode_trns_chunk(AVCodecContext *avctx, 
PNGDecContext *s,
             return AVERROR_INVALIDDATA;
 
         for (i = 0; i < length; i++) {
-            v = bytestream2_get_byte(&s->gb);
+            unsigned v = bytestream2_get_byte(&s->gb);
             s->palette[i] = (s->palette[i] & 0x00ffffff) | (v << 24);
         }
     } else if (s->color_type == PNG_COLOR_TYPE_GRAY || s->color_type == 
PNG_COLOR_TYPE_RGB) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to