From 9eacc03879c32c9eee4d6650dc3ca79a37bb73ab 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 4662ebbf..838f380c 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -23011,7 +23011,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 *