[gs-commits] mupdf/master - 0_6-243-gc2591ea - Bail on JPX images with unknown colorspaces.
Tor Andersson
tor at ghostscript.com
Tue Aug 3 12:09:46 UTC 2010
commit c2591ea14d529b2376200ce9e279db1982ee1ea7
Author: Tor Andersson <tor at ghostscript.com>
Date: Fri Jul 30 13:38:54 2010 +0000
Bail on JPX images with unknown colorspaces.
Ignore-this: 9eb862ea13e8a50e8908eb1b1710095c
darcs-hash:20100730133854-f546f-4dfa46fbe16987ad15f75884c5799091b4500a34.gz
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fitz/filt_jpxd.c b/fitz/filt_jpxd.c
index a78d093..34f6844 100644
--- a/fitz/filt_jpxd.c
+++ b/fitz/filt_jpxd.c
@@ -104,10 +104,14 @@ pdf_loadjpximage(pdf_image **imgp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict)
switch (n)
{
- default:
case 1: img->colorspace = fz_devicegray; break;
case 3: img->colorspace = fz_devicergb; break;
case 4: img->colorspace = fz_devicecmyk; break;
+ default:
+ /* TODO: SMaskInData */
+ opj_image_destroy(jpx);
+ fz_free(img);
+ return fz_throw("unknown jpx colorspace (%d components)", n);
}
for (k = 0; k < n; k++)
--
git/hooks/post-receive
More information about the gs-commits
mailing list