summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2010-04-12 00:37:05 +0200
committerSebastian Rasmussen <sebras@hotmail.com>2010-04-12 00:37:05 +0200
commitcab74e938f70a0f3e815fa8bc320f40f788bd50b (patch)
tree74a325589a22d8c2322578bf1374dadf6da344fd
parent353b910ded50ded0c755bb28f7319e8f898c3446 (diff)
downloadmupdf-cab74e938f70a0f3e815fa8bc320f40f788bd50b.tar.xz
Expect encryption object to be a dictionary instead of taking special care of null objects.
-rw-r--r--mupdf/pdf_xref.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mupdf/pdf_xref.c b/mupdf/pdf_xref.c
index 5c365f7f..c757fe82 100644
--- a/mupdf/pdf_xref.c
+++ b/mupdf/pdf_xref.c
@@ -138,11 +138,8 @@ pdf_decryptxref(pdf_xref *xref)
encrypt = fz_dictgets(xref->trailer, "Encrypt");
id = fz_dictgets(xref->trailer, "ID");
- if (encrypt)
+ if (fz_isdict(encrypt))
{
- if (fz_isnull(encrypt))
- return fz_okay;
-
error = pdf_newcrypt(&xref->crypt, encrypt, id);
if (error)
return fz_rethrow(error, "cannot create decrypter");