summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-08-09 04:10:51 +0800
committerSebastian Rasmussen <sebras@gmail.com>2018-08-10 13:54:32 +0800
commitdb6823cd748a65930b778dd3859a6fe99f38be96 (patch)
treeed4de2770971846b55981d0b91e077ba2d7e1da1
parent0d5ea5441819d63d5685f156be0abaf65bc8800b (diff)
downloadmupdf-db6823cd748a65930b778dd3859a6fe99f38be96.tar.xz
Bug 699628: Add fz_var to variable set in fz_try and used in fz_always.
When pdf_xobject_transparency() indicates transparency, pdf_run_xobject() will push a mask with 2 components (gray + alpha). Because fz_var was missing for the transparency variable its value would, if fz_throw() was called, not be preserved in fz_always{}. This means that fz_always{} would never pop the mask from the stack. At a later stage some code would call fz_end_mask() and then trigger an assert() where the number of components was restricted to 1. Marking the variable with fz_var means that the mask will now be popped as expected. Thanks to oss-fuzz for reporting.
-rw-r--r--source/pdf/pdf-op-run.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
index 0bd4ec21..42b67214 100644
--- a/source/pdf/pdf-op-run.c
+++ b/source/pdf/pdf-op-run.c
@@ -1213,6 +1213,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
fz_var(oldbot);
fz_var(cs);
fz_var(saved_def_cs);
+ fz_var(transparency);
gparent_save = pr->gparent;
pr->gparent = pr->gtop;