aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-11 20:28:46 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-07-19 15:26:37 +0200
commitcce9471373cf758ec576cd55f6cb8001e0acd62a (patch)
tree6fd5a4656a5963a7bb69389ac4ca610f7908e982
parent34282abc57f4ad66d5b7e0dbed1eadfff41616d8 (diff)
downloadffmpeg-cce9471373cf758ec576cd55f6cb8001e0acd62a.tar.gz
avcodec/jpeg2000dwt: Fix runtime error: left shift of negative value -123
Fixes: 2208/clusterfuzz-testcase-minimized-5976593765761024 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 d24043e1a2f93f206a2ad59054f24f45ff023e5c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/jpeg2000dwt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index 188cc261a4..735ed0b1dc 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -488,7 +488,7 @@ static void dwt_decode97_int(DWTContext *s, int32_t *t)
line += 5;
for (i = 0; i < w * h; i++)
- data[i] <<= I_PRESHIFT;
+ data[i] *= 1 << I_PRESHIFT;
for (lev = 0; lev < s->ndeclevels; lev++) {
int lh = s->linelen[lev][0],