summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf/pdf_image.c7
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 */