Merge pull request #1408 from rouault/fix_ossfuzz_44544

Avoid integer overflows in DWT. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44544
This commit is contained in:
Even Rouault 2022-02-10 15:13:49 +01:00 committed by GitHub
commit 3837ff1b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -801,7 +801,8 @@ static void opj_idwt3_v_cas0(OPJ_INT32* tmp,
opj_int_add_no_overflow(opj_int_add_no_overflow(d1c, d1n), 2) >> 2);
tmp[i ] = s0c;
tmp[i + 1] = d1c + ((s0c + s0n) >> 1);
tmp[i + 1] = opj_int_add_no_overflow(d1c, opj_int_add_no_overflow(s0c,
s0n) >> 1);
}
tmp[i] = s0n;