[FFmpeg-cvslog] avcodec/cfhd: Fix invalid left shift of negative value

Michael Niedermayer git at videolan.org
Tue Aug 1 15:42:55 EEST 2017


ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jun 28 20:47:59 2017 +0200| [d2452b9e20ec16f241274f9ea836803b0652678e] | committer: Michael Niedermayer

avcodec/cfhd: Fix invalid left shift of negative value

Fixes: runtime error: left shift of negative value -1
Fixes: 2395/clusterfuzz-testcase-minimized-6540529313513472

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

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

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

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 51ff26e57a..3dc768e516 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -662,7 +662,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
             output = s->plane[plane].subband[0];
             for (i = 0; i < lowpass_height * 2; i++) {
                 for (j = 0; j < lowpass_width * 2; j++)
-                    output[j] <<= 2;
+                    output[j] *= 4;
 
                 output += lowpass_width * 2;
             }



More information about the ffmpeg-cvslog mailing list