aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-26 15:05:08 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-07-19 02:45:51 +0200
commit634e9a696d85fd32456f61aa23ca5f90544788fe (patch)
treea35fdf4d703c8ee64c8b78062099d5c429a20847
parent750fec58e175b22ac23ff349c4b0a9b765ea4d0c (diff)
downloadffmpeg-634e9a696d85fd32456f61aa23ca5f90544788fe.tar.gz
avcodec/jpeg2000dwt: Fix integer overflow in dwt_decode97_int()
Fixes: runtime error: signed integer overflow: -163654656 * 256 cannot be represented in type 'int' Fixes: 2367/clusterfuzz-testcase-minimized-4648678897745920 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 ea5366670e26b2c6c396e6a5f49827a2b71e6dd6) 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 735ed0b1dc..e4aa2e4a3d 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] *= 1 << I_PRESHIFT;
+ data[i] *= 1LL << I_PRESHIFT;
for (lev = 0; lev < s->ndeclevels; lev++) {
int lh = s->linelen[lev][0],