diff options
Diffstat (limited to 'pdf/pdf_crypt.c')
-rw-r--r-- | pdf/pdf_crypt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pdf/pdf_crypt.c b/pdf/pdf_crypt.c index c272562e..18b3d554 100644 --- a/pdf/pdf_crypt.c +++ b/pdf/pdf_crypt.c @@ -579,6 +579,8 @@ pdf_authenticate_password(pdf_xref *xref, char *password) { if (xref->crypt) { + if (!password) + password = ""; if (pdf_authenticate_user_password(xref->crypt, (unsigned char *)password, strlen(password))) return 1; if (pdf_authenticate_owner_password(xref->crypt, (unsigned char *)password, strlen(password))) |