From 218264fada2d31dff1b2e818a661c587f63e4448 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Thu, 30 Jan 2025 01:26:01 +0100 Subject: [PATCH] parser: Always shrink input buffer Shrinking the input buffer is cheap now and should be done as soon as possible. --- parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parser.c b/parser.c index 52199988..457f0d21 100644 --- a/parser.c +++ b/parser.c @@ -2411,9 +2411,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) { } while (0) #define SHRINK \ - if ((!PARSER_PROGRESSIVE(ctxt)) && \ - (ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \ - (ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \ + if (!PARSER_PROGRESSIVE(ctxt)) \ xmlParserShrink(ctxt); #define GROW \