aboutsummaryrefslogblamecommitdiffstats
path: root/main/openjpeg/CVE-2020-27824.patch
blob: b176d60b1e7e79997c6bf2920d13aa1265a45d45 (plain) (tree)
























                                                                                              
From dcb3063cd8101c751f3fd97249f41aaabe17ec82 Mon Sep 17 00:00:00 2001
From: Leo <thinkabit.ukim@gmail.com>
Date: Wed, 23 Dec 2020 00:01:25 -0300
Subject: [PATCH 3/3] CVE-2020-27824

---
 src/lib/openjp2/dwt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/openjp2/dwt.c b/src/lib/openjp2/dwt.c
index 5930d1c..a1d5d61 100644
--- a/src/lib/openjp2/dwt.c
+++ b/src/lib/openjp2/dwt.c
@@ -1293,7 +1293,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),
-- 
2.29.2