summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-09-06 12:02:54 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-09-07 08:54:28 +0100
commit7b283e7408501680d7ab2e63a1b0d05f9b76a2c5 (patch)
treeea5fe4aed85813586726e78a6bad8c1c21bbe21f
parenta74da00e9b88cd9b0e684c8a7e8250d64145b238 (diff)
downloadghostpdl-7b283e7408501680d7ab2e63a1b0d05f9b76a2c5.tar.gz
Bug 705844: Fix depth checking for optional content flags.
-rw-r--r--pdf/pdf_optcontent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_optcontent.c b/pdf/pdf_optcontent.c
index f6c6faf2a..ebade7722 100644
--- a/pdf/pdf_optcontent.c
+++ b/pdf/pdf_optcontent.c
@@ -367,7 +367,7 @@ static int pdfi_oc_levels_set(pdf_context *ctx, pdfi_oc_levels_t *levels, uint64
byte *new = NULL;
uint64_t newmax;
- if (index > levels->max_flags) {
+ if (index > levels->max_flags - 1) {
/* Expand the flags buffer */
newmax = levels->max_flags + NUM_CONTENT_LEVELS;
if (index > newmax)