[FFmpeg-cvslog] avcodec/cfhd: Fix undefined shift
Michael Niedermayer
git at videolan.org
Sun Jul 30 00:34:41 EEST 2017
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jun 21 17:56:34 2017 +0200| [6d951be24de8748845a6e9d8151e2e605543b44d] | committer: Michael Niedermayer
avcodec/cfhd: Fix undefined shift
Fixes: runtime error: left shift of negative value -1
Fixes: 2303/clusterfuzz-testcase-minimized-5529675273076736
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 5a950f4e32a9756391f81987246d96b6549dd447)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d951be24de8748845a6e9d8151e2e605543b44d
---
libavcodec/cfhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index ed127de29e..2a53a23c2b 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -711,7 +711,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