Skip to content

Commit

Permalink
opj_tcd_dc_level_shift_decode(): avoid increment nullptr (fixes uclou…
Browse files Browse the repository at this point in the history
…vain#1480)

(likely harmless issue as we don't dereference it)
  • Loading branch information
rouault committed Dec 8, 2023
1 parent ffccf1f commit 6c8c6c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/openjp2/tcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2315,6 +2315,9 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
l_max = (OPJ_INT32)((1U << l_img_comp->prec) - 1);
}

if (l_width == 0 || l_height == 0) {
continue;
}

if (l_tccp->qmfbid == 1) {
for (j = 0; j < l_height; ++j) {
Expand Down

0 comments on commit 6c8c6c2

Please sign in to comment.