diff options
Diffstat (limited to 'converter/other/jpeg2000')
-rw-r--r-- | converter/other/jpeg2000/libjasper/base/jas_image.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/converter/other/jpeg2000/libjasper/base/jas_image.c b/converter/other/jpeg2000/libjasper/base/jas_image.c index 903b45c6..5c2822be 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_image.c +++ b/converter/other/jpeg2000/libjasper/base/jas_image.c @@ -885,6 +885,10 @@ int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents, cmptparms.prec = JAS_IMAGE_CDT_GETPREC(dtype); cmptparms.sgnd = JAS_IMAGE_CDT_GETSGND(dtype); + if (numlutents < 1) { + return -1; + } + if (jas_image_addcmpt(image, newcmptno, &cmptparms)) { return -1; } |