summaryrefslogtreecommitdiff
path: root/tests/nonregression/CMakeLists.txt
diff options
context:
space:
mode:
authormayeut <mayeut@users.noreply.github.com>2023-09-23 11:02:54 +0200
committermayeut <mayeut@users.noreply.github.com>2023-09-23 12:50:57 +0200
commitd23e0284c9be174cc6daaa594c1139076771e16b (patch)
treed442dd10e7a11500b68d5ac11f43c5969856ce9b /tests/nonregression/CMakeLists.txt
parent1ee6d115e80036d1d38bad7f95a680bfc612c1bf (diff)
fix: use `opj_uint_ceildiv` instead of `opj_int_ceildiv` when necessary
There are a bunch of loc where we can see a usage of `opj_int_ceildiv`: ``` (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)a, (OPJ_INT32)b); ``` where a & b are `OPJ_UINT32`. This can lead to overflow/underflow for some a/b combinations. Replace those calls by `opj_uint_ceildiv` instead to always get a correct result. This also allows some valid single tile images with huge tile size to be decoded properly. Fix #1438
Diffstat (limited to 'tests/nonregression/CMakeLists.txt')
-rw-r--r--tests/nonregression/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/nonregression/CMakeLists.txt b/tests/nonregression/CMakeLists.txt
index c515ae61..05fce40c 100644
--- a/tests/nonregression/CMakeLists.txt
+++ b/tests/nonregression/CMakeLists.txt
@@ -84,6 +84,7 @@ set(BLACKLIST_JPEG2000
issue823.jp2 #kdu_jp2info ok
issue826.jp2 #inspection reveales that the transformation value is out of range
oss-fuzz2785.jp2 #inspection reveales that the transformation value is out of range
+ issue1438.j2k
)
file(GLOB_RECURSE OPJ_DATA_NR_LIST