summaryrefslogtreecommitdiff
path: root/source/helpers/mu-threads/mu-threads.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-01-29 02:00:48 +0100
committerSebastian Rasmussen <sebras@gmail.com>2018-02-01 17:13:41 +0100
commit26527eef77b3e51c2258c8e40845bfbc015e405d (patch)
treec813da7c64be4a04ad59421b19ff824bb13d1fff /source/helpers/mu-threads/mu-threads.c
parentab98356f959c7a6e94b1ec10f78dd2c33ed3f3e7 (diff)
downloadmupdf-26527eef77b3e51c2258c8e40845bfbc015e405d.tar.xz
Bug 698830: Don't drop unkept stream if running out of error stack.
Under normal conditions where fz_keep_stream() is called inside fz_try() we may call fz_drop_stream() in fz_catch() upon exceptions. The issue comes when fz_keep_stream() has not yet been called but is dropped in fz_catch(). This happens in the PDF from the bug when fz_try() runs out of exception stack, and next the code in fz_catch() runs, dropping the caller's reference to the filter chain stream! The simplest way of fixing this it to always keep the filter chain stream before fz_try() is called. That way fz_catch() may drop the stream whether an exception has occurred or if the fz_try() ran out of exception stack.
Diffstat (limited to 'source/helpers/mu-threads/mu-threads.c')
0 files changed, 0 insertions, 0 deletions