Skip to content

Commit

Permalink
Merge pull request #1292 from rouault/fix_1286
Browse files Browse the repository at this point in the history
Encoder: avoid global buffer overflow on irreversible conversion when…
  • Loading branch information
rouault committed Dec 1, 2020
2 parents 2d119d0 + 6daf5f3 commit 61ff143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/openjp2/dwt.c
Expand Up @@ -1976,7 +1976,7 @@ void opj_dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, OPJ_UINT32 prec)
if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) {
stepsize = 1.0;
} else {
OPJ_FLOAT64 norm = opj_dwt_norms_real[orient][level];
OPJ_FLOAT64 norm = opj_dwt_getnorm_real(level, orient);
stepsize = (1 << (gain)) / norm;
}
opj_dwt_encode_stepsize((OPJ_INT32) floor(stepsize * 8192.0),
Expand Down

0 comments on commit 61ff143

Please sign in to comment.