summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-11-30 22:37:07 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-11-30 23:29:06 +0100
commit6daf5f3e1ec6eff03b7982889874a3de6617db8d (patch)
tree4dc3ed2b412c3f39cdb507aa6c731e23467b65c1 /src/lib
parent2d119d03a0c9f5e3b6c2a70c30cbdcea4857b40a (diff)
Encoder: avoid global buffer overflow on irreversible conversion when too many decomposition levels are specified (fixes #1286)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/dwt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/dwt.c b/src/lib/openjp2/dwt.c
index ee9eb5e6..4164ba09 100644
--- a/src/lib/openjp2/dwt.c
+++ b/src/lib/openjp2/dwt.c
@@ -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),