summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2023-12-08 17:23:24 +0100
committerGitHub <noreply@github.com>2023-12-08 17:23:24 +0100
commitdfdedea48f0b1f0d7f7d28c5e98be6a64f8febc8 (patch)
tree534e2bf29e0c6382125ad12d75d23183a651dc77 /src/lib
parent49c4ef56129b85cce8aaad85e9f22f0f3bc16f2e (diff)
parent90312af28d34679e641ce7bd7e3e68a0db49555f (diff)
Merge pull request #1496 from rouault/fix_1480
opj_tcd_dc_level_shift_decode(): avoid increment nullptr (fixes #1480)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/tcd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
index 55e9a088..687aa61b 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) {