Fix allocation limit checking bug in jp2 handler


Checking should be disabled if the limit is set to 0.

Fixes: QTBUG-118797
Pick-to: 6.7 6.6
Change-Id: Ie5e01fb3d3b44eae957dbb66237eb7e9d13dc8b6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
commit1b0f4df30263ad5cf95950f77761a9d813836927
parentcc3b9a462a264ca9a9819f2e2c091393e3a22b49
authorEirik Aavitsland <eirik.aavitsland@qt.io>
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>
commit timeTue, 12 Dec 2023 17:33:12 +0000