diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-05-09 22:15:11 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-05-10 01:16:28 +0800 |
commit | e6dfa88940aec6820411fc0d013c2bd0faa5547e (patch) | |
tree | 81c7fc7c0a74e10463803b7dd625edccd3fc0f37 /docs/examples/trace-device.js | |
parent | 8fb0e3989a6867b67d5cafb04b622701d383a832 (diff) | |
download | mupdf-e6dfa88940aec6820411fc0d013c2bd0faa5547e.tar.xz |
Use fz_malloc_no_throw() in JPEG/DCT decoder.
Suppose an application that uses MuPDF implements its own
allocator that limits the amount of memory that may be allocated.
When that condition occurs fz_malloc() will throw an exception,
this exception would then be thrown right back to MuPDF without
allowing for libjpeg to free any of the memory it has allocated.
After this commit fz_malloc_no_throw() is called, which under the
same conditions would simply return NULL. allowing for libjpeg to
free what ever allocations it has done, and return to MuPDF with
an error just like before.
Diffstat (limited to 'docs/examples/trace-device.js')
0 files changed, 0 insertions, 0 deletions