diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-13 01:40:35 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-13 01:43:21 +0800 |
commit | a0aa734da4f56ff5d5690bc1229c63a2d712087a (patch) | |
tree | b0c3a0e06a758f9327ca908024fcafb989b5d0dc /source | |
parent | ded36857c6ac60808909454a06e021fafe151f41 (diff) | |
download | mupdf-a0aa734da4f56ff5d5690bc1229c63a2d712087a.tar.xz |
crypt: Handle null pointer when dropping crypt object.
Exposed by weird-jpx.pdf from bug 696885.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-crypt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c index b17c2a71..1499e39e 100644 --- a/source/pdf/pdf-crypt.c +++ b/source/pdf/pdf-crypt.c @@ -272,6 +272,9 @@ pdf_new_crypt(fz_context *ctx, pdf_obj *dict, pdf_obj *id) void pdf_drop_crypt(fz_context *ctx, pdf_crypt *crypt) { + if (!crypt) + return; + pdf_drop_obj(ctx, crypt->id); pdf_drop_obj(ctx, crypt->cf); fz_free(ctx, crypt); |