diff options
Diffstat (limited to 'pdf/pdf_crypt.c')
-rw-r--r-- | pdf/pdf_crypt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pdf/pdf_crypt.c b/pdf/pdf_crypt.c index 1ae16b37..98ad0159 100644 --- a/pdf/pdf_crypt.c +++ b/pdf/pdf_crypt.c @@ -722,7 +722,11 @@ pdf_crypt_obj_imp(fz_context *ctx, pdf_crypt *crypt, fz_obj *obj, unsigned char if (crypt->strf.method == PDF_CRYPT_AESV2 || crypt->strf.method == PDF_CRYPT_AESV3) { - if (n & 15 || n < 32) + if (n == 0) + { + /* Empty strings are permissible */ + } + else if (n & 15 || n < 32) fz_warn(ctx, "invalid string length for aes encryption"); else { |