aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-28 20:47:59 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-07-19 02:49:04 +0200
commit7807d2478bfde81a34412dd4f51cc0a9f3a6760f (patch)
tree9165ff09271084f88353436a716de3bf3d3478ea
parentcc9082dce19cc45bc8dbe7aee4efa86c56e2e319 (diff)
downloadffmpeg-7807d2478bfde81a34412dd4f51cc0a9f3a6760f.tar.gz
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@niedermayer.cc> (cherry picked from commit c709f009dad20d99b28918f4f8d7cd394b838def) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/cfhd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index f596554e1b..b14de9ec04 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -631,7 +631,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;
}