diff options
-rw-r--r-- | source/pdf/pdf-crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c index a26f91a3..bdfdd672 100644 --- a/source/pdf/pdf-crypt.c +++ b/source/pdf/pdf-crypt.c @@ -332,7 +332,7 @@ pdf_parse_crypt_filter(fz_context *ctx, pdf_crypt_filter *cf, pdf_crypt *crypt, fz_throw(ctx, FZ_ERROR_GENERIC, "invalid key length: %d", cf->length); if ((crypt->r == 1 || crypt->r == 2 || crypt->r == 3 || crypt->r == 4) && - (cf->length < 0 || cf->length > 128)) + (cf->length < 40 || cf->length > 128)) fz_throw(ctx, FZ_ERROR_GENERIC, "invalid key length: %d", cf->length); if ((crypt->r == 5 || crypt->r == 6) && cf->length != 256) fz_throw(ctx, FZ_ERROR_GENERIC, "invalid key length: %d", cf->length); |