diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-07-31 03:31:06 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-08-30 21:11:41 +0800 |
commit | 984887ee8fb431e5c5d243c40dcb73d5149b033f (patch) | |
tree | b70ce55f4be537c7cbb1506f6752d7449ba24412 /source/fitz/ftoa.c | |
parent | 7ae91795c6830d0a8e708746193d2fb1243a0deb (diff) | |
download | mupdf-984887ee8fb431e5c5d243c40dcb73d5149b033f.tar.xz |
Bug 699694: Fix reference counting for JBIG2 globals.
fz_open_jbig2d() is called at two locations in MuPDF. At one
location a reference to the JBIG2 globals struct was taken before
passing it to fz_open_jbig2d(). At the other location no such
reference was taken, but rather ownership of the struct was
implicitly transferred to fz_open_jbig2d(). This inconsistency
led to a leak of the globals struct at the first location.
Now, passing a JBIG2 globals struct to fz_open_jbig2d() never
implictly takes ownership. Instead the JBIG2 stream will take a
reference if it needs it and drops it in case of error. As usual
it is the callers responsibility to drop the reference to the
globals struct it owns.
Diffstat (limited to 'source/fitz/ftoa.c')
0 files changed, 0 insertions, 0 deletions