diff options
author | Simon Bünzli <zeniko@gmail.com> | 2013-08-30 18:29:49 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-09-10 14:14:42 +0100 |
commit | 455fecd8213201417a75f887349a5c3b75d5f46d (patch) | |
tree | fa51c65e77487ab44d8a61ed6e5737db66095ef5 /source/pdf | |
parent | 6904674fceaa8b289ef70b692ffa2aa7f7afb726 (diff) | |
download | mupdf-455fecd8213201417a75f887349a5c3b75d5f46d.tar.xz |
tolerate xobjects with invalid colorspaces
This fixes 2258_-_invalid_transparency_group_colorspace.pdf
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-xobject.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/pdf/pdf-xobject.c b/source/pdf/pdf-xobject.c index 0924e118..648f8d29 100644 --- a/source/pdf/pdf-xobject.c +++ b/source/pdf/pdf-xobject.c @@ -86,9 +86,14 @@ pdf_load_xobject(pdf_document *doc, pdf_obj *dict) obj = pdf_dict_gets(attrs, "CS"); if (obj) { - form->colorspace = pdf_load_colorspace(doc, obj); - if (!form->colorspace) - fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load xobject colorspace"); + fz_try(ctx) + { + form->colorspace = pdf_load_colorspace(doc, obj); + } + fz_catch(ctx) + { + fz_warn(ctx, "cannot load xobject colorspace"); + } } } |