Commit 634e9a69 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ea536667)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 750fec58
...@@ -488,7 +488,7 @@ static void dwt_decode97_int(DWTContext *s, int32_t *t) ...@@ -488,7 +488,7 @@ static void dwt_decode97_int(DWTContext *s, int32_t *t)
line += 5; line += 5;
for (i = 0; i < w * h; i++) for (i = 0; i < w * h; i++)
data[i] *= 1 << I_PRESHIFT; data[i] *= 1LL << I_PRESHIFT;
for (lev = 0; lev < s->ndeclevels; lev++) { for (lev = 0; lev < s->ndeclevels; lev++) {
int lh = s->linelen[lev][0], int lh = s->linelen[lev][0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment