Skip to content

Commit

Permalink
Merge pull request #1496 from rouault/fix_1480
Browse files Browse the repository at this point in the history
opj_tcd_dc_level_shift_decode(): avoid increment nullptr (fixes #1480)
  • Loading branch information
rouault authored Dec 8, 2023
2 parents 49c4ef5 + 90312af commit dfdedea
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 dfdedea

Please sign in to comment.