diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-08-12 16:56:57 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-08-14 20:56:54 +0800 |
commit | 2c9c8b75de448ae0ee1394f672eb0baa4c7dd57a (patch) | |
tree | 06c67eb7caeca6ac9404b739b6c46670a4156c67 /source/fitz/getopt.c | |
parent | 8aa2bd34065d2844aae778bd4cc20c74bbcd9406 (diff) | |
download | mupdf-2c9c8b75de448ae0ee1394f672eb0baa4c7dd57a.tar.xz |
Bug 698898: Always pop draw stack in case of exception.
When fz_draw_clip_image_mask() calls fz_get_pixmap_from_image()
may throw an exception, in this case beacuse a predicted image
has an unsupported number of components (1, 2, 4, 8 and 16 are
supported, but 6 is not). When this happens the recently pushed
stack element is never popped, which later trips an assert() in
fz_draw_end_group() at a later stage.
By moving the call to fz_get_pixmap_from_image() inside fz_try
the stack will be popped, thus avoiding triggering the assert().
This also requires the pixmap variable to be fz_var()ed because
it changes inside the fz_try-block.
Diffstat (limited to 'source/fitz/getopt.c')
0 files changed, 0 insertions, 0 deletions