From da703eaaea152f6dd9e871cbe7f0ae46322c583d Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 5 Nov 2023 02:03:05 +0100 Subject: [PATCH] schemas: Fix reallocation in xmlSchemaXPathProcessHistory See #614. --- xmlschemas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlschemas.c b/xmlschemas.c index b9c61b82..d276faf1 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -22744,7 +22744,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt, } else if (pos >= matcher->sizeKeySeqs) { int i = matcher->sizeKeySeqs; - matcher->sizeKeySeqs *= 2; + matcher->sizeKeySeqs = pos * 2; matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **) xmlRealloc(matcher->keySeqs, matcher->sizeKeySeqs *