From c3da8016dcb38098a04f3cdcdd1d5db0008d86c0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 13 Feb 2018 16:31:16 +0100 Subject: Don't use constants larger than will fit in a signed int in enum. --- include/mupdf/pdf/crypt.h | 1 - source/pdf/pdf-crypt.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mupdf/pdf/crypt.h b/include/mupdf/pdf/crypt.h index 04c884eb..aca055c8 100644 --- a/include/mupdf/pdf/crypt.h +++ b/include/mupdf/pdf/crypt.h @@ -36,7 +36,6 @@ enum PDF_PERM_ACCESSIBILITY = 1 << 9, /* deprecated in pdf 2.0 (this permission is always granted) */ PDF_PERM_ASSEMBLE = 1 << 10, PDF_PERM_PRINT_HQ = 1 << 11, - PDF_DEFAULT_PERM_FLAGS = 0xFFFFFFFC /* all permissions granted, reserved bits set appropriately */ }; /* diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c index a62b12f0..1ceaa1be 100644 --- a/source/pdf/pdf-crypt.c +++ b/source/pdf/pdf-crypt.c @@ -814,7 +814,8 @@ pdf_document_permissions(fz_context *ctx, pdf_document *doc) { if (doc->crypt) return doc->crypt->p; - return PDF_DEFAULT_PERM_FLAGS; + /* all permissions granted, reserved bits set appropriately */ + return (int)0xFFFFFFFC; } unsigned char * -- cgit v1.2.3