diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-12-07 22:29:03 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-12-08 11:43:13 +0000 |
commit | 4e4c33095f62e9a02fc338baec367ae89fe51c2a (patch) | |
tree | 94290fdb4ca16de5f9224f276a816ecb63fabf77 | |
parent | 164ae7a63b56da5a1a2cf63701583753aa433762 (diff) | |
download | mupdf-4e4c33095f62e9a02fc338baec367ae89fe51c2a.tar.xz |
Ignore invalid color key Masks that contain non-integer values.
-rw-r--r-- | pdf/pdf_image.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c index 50292092..3ae0fdfc 100644 --- a/pdf/pdf_image.c +++ b/pdf/pdf_image.c @@ -154,7 +154,14 @@ pdf_load_image_imp(fz_pixmap **imgp, pdf_xref *xref, fz_obj *rdb, fz_obj *dict, { usecolorkey = 1; for (i = 0; i < n * 2; i++) + { + if (!fz_is_int(fz_array_get(obj, i))) + { + fz_warn("invalid value in color key mask"); + usecolorkey = 0; + } colorkey[i] = fz_to_int(fz_array_get(obj, i)); + } } /* Allocate now, to fail early if we run out of memory */ |