Skip to content

Commit

Permalink
Fix runtime error: applying zero offset to null pointer in file src/l…
Browse files Browse the repository at this point in the history
…ib/openjp2/dwt.c:2124
  • Loading branch information
xiaoxiaoafeifei committed Jan 22, 2024
1 parent 0e3b3bd commit 0f537be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/openjp2/dwt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,11 @@ static OPJ_BOOL opj_dwt_decode_tile(opj_thread_pool_t* tp,

if (num_threads <= 1 || rh <= 1) {
for (j = 0; j < rh; ++j) {
/* Avoid runtime error: applying zero offset to null pointer: tiledp */
if (!tiledp) {
opj_aligned_free(h.mem);
return OPJ_FALSE;
}
opj_idwt53_h(&h, &tiledp[(OPJ_SIZE_T)j * w]);
}
} else {
Expand Down

0 comments on commit 0f537be

Please sign in to comment.