From 7b283e7408501680d7ab2e63a1b0d05f9b76a2c5 Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Tue, 6 Sep 2022 12:02:54 +0100 Subject: Bug 705844: Fix depth checking for optional content flags. --- pdf/pdf_optcontent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1