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 *