projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0e83a1
)
opj_dwt_decode_tile(): avoid potential UndefinedBehaviorSanitizer 'applying zero...
1510/head
author
Even Rouault
<even.rouault@spatialys.com>
Sun, 18 Feb 2024 16:17:00 +0000
(17:17 +0100)
committer
Even Rouault
<even.rouault@spatialys.com>
Sun, 18 Feb 2024 16:17:00 +0000
(17:17 +0100)
src/lib/openjp2/dwt.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/dwt.c
b/src/lib/openjp2/dwt.c
index abc500eca6bb27e6eb8e87a08b524448d0a10b6a..6b18c5dd6e9dda00d31b5b57155228eba587a885 100644
(file)
--- a/
src/lib/openjp2/dwt.c
+++ b/
src/lib/openjp2/dwt.c
@@
-2083,7
+2083,9
@@
static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t* tp,
OPJ_SIZE_T h_mem_size;
int num_threads;
- if (numres == 1U) {
+ /* Not entirely sure for the return code of w == 0 which is triggered per */
+ /* https://github.com/uclouvain/openjpeg/issues/1505 */
+ if (numres == 1U || w == 0) {
return OPJ_TRUE;
}
num_threads = opj_thread_pool_get_thread_count(tp);