File openjpeg2-CVE-2020-27824.patch of Package openjpeg2.26563
Index: openjpeg-2.3.0/src/lib/openjp2/dwt.c
===================================================================
--- openjpeg-2.3.0.orig/src/lib/openjp2/dwt.c
+++ openjpeg-2.3.0/src/lib/openjp2/dwt.c
@@ -1293,7 +1293,7 @@ void opj_dwt_calc_explicit_stepsizes(opj
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),