From 7fbd454d9f70f0f0c0a0c27a7d541fed4d038c2a Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 21 Mar 2023 13:26:36 +0100 Subject: parser: Grow input buffer earlier when reading characters Make more bytes available after invoking CUR_CHAR or NEXT. --- HTMLparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HTMLparser.c') diff --git a/HTMLparser.c b/HTMLparser.c index 3bebda6e..b8b6bd23 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -411,7 +411,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { return(ctxt->token); } - if ((ctxt->input->end - ctxt->input->cur < 4) && + if ((ctxt->input->end - ctxt->input->cur < INPUT_CHUNK) && (xmlParserGrow(ctxt) < 0)) return(0); -- cgit v1.2.1