summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-13 16:31:16 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-02-27 13:14:55 +0100
commitc3da8016dcb38098a04f3cdcdd1d5db0008d86c0 (patch)
treea3a667e611cce25279edbb05f4a3707f1e549248
parentb04a5e3de89c54df0d971a3d5ca8727de994d08c (diff)
downloadmupdf-c3da8016dcb38098a04f3cdcdd1d5db0008d86c0.tar.xz
Don't use constants larger than will fit in a signed int in enum.
-rw-r--r--include/mupdf/pdf/crypt.h1
-rw-r--r--source/pdf/pdf-crypt.c3
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 *