projects
/
openjpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
opj_dwt_decode_tile(): avoid potential UndefinedBehaviorSanitizer 'applying zero...
[openjpeg.git]
/
src
/
lib
/
openjp2
/
dwt.c
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;
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);
return OPJ_TRUE;
}
num_threads = opj_thread_pool_get_thread_count(tp);