diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-06 00:27:42 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2012-08-06 14:06:10 +0200 |
commit | e3e89a4b73a956ffb74d7a49d80f2d58235b7292 (patch) | |
tree | e6a5c5869bc6bb1f23b444a7e451615b7018c217 /pdf | |
parent | 8f1909597745d2c881f1cacfff7e0a72eb233438 (diff) | |
download | mupdf-e3e89a4b73a956ffb74d7a49d80f2d58235b7292.tar.xz |
Free inline image dictionary upon error parsing image
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_interpret.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c index 03e09587..8c1e40e6 100644 --- a/pdf/pdf_interpret.c +++ b/pdf/pdf_interpret.c @@ -1643,9 +1643,19 @@ static void pdf_run_BI(pdf_csi *csi, pdf_obj *rdb, fz_stream *file) if (fz_peek_byte(file) == '\n') fz_read_byte(file); - img = pdf_load_inline_image(csi->xref, rdb, obj, file); - pdf_drop_obj(obj); - /* RJW: "cannot load inline image" */ + fz_try(ctx) + { + img = pdf_load_inline_image(csi->xref, rdb, obj, file); + } + fz_always(ctx) + { + pdf_drop_obj(obj); + } + fz_catch(ctx) + { + /* RJW: "cannot load inline image" */ + fz_rethrow(ctx); + } pdf_show_image(csi, img); |