[FFmpeg-cvslog] avcodec/snowdec: Fix runtime error: left shift of negative value -1

Michael Niedermayer git at videolan.org
Thu Aug 24 15:03:52 EEST 2017


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jun 11 14:34:54 2017 +0200| [d182bb21add5466df01dedb274a708d90802cd19] | committer: Michael Niedermayer

avcodec/snowdec: Fix runtime error: left shift of negative value -1

Fixes: 2197/clusterfuzz-testcase-minimized-6010716676947968

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 2e44126363bc9e23093ceced5d7bde1ee4bbb338)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index e5051c4ff7..4d50026d71 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -583,7 +583,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                 for(; yq<slice_h && yq<h; yq++){
                     IDWTELEM * line = slice_buffer_get_line(&s->sb, yq);
                     for(x=0; x<w; x++){
-                        line[x] <<= FRAC_BITS;
+                        line[x] *= 1<<FRAC_BITS;
                     }
                 }
             }



More information about the ffmpeg-cvslog mailing list