diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2023-12-08 16:05:12 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2023-12-08 16:05:52 +0100 |
| commit | 90312af28d34679e641ce7bd7e3e68a0db49555f (patch) | |
| tree | a9c2adb950ed3662a0322cdb725526a2c6325820 /src | |
| parent | b0e83a1b3399f5f847250bdc044a96f22cb156d7 (diff) | |
opj_tcd_dc_level_shift_decode(): avoid increment nullptr (fixes #1480)
(likely harmless issue as we don't dereference it)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/tcd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index 438247b6..b2375146 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -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) { |
