1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

html: Add missing call to grow parser in htmlParseComment

Otherwise, long chains of short comments could exhaust the input buffer
when pull parsing.
This commit is contained in:
Nick Wellnhofer
2025-06-08 13:05:22 +02:00
parent 70335c41fc
commit 6b50d8c888

View File

@@ -3380,6 +3380,10 @@ htmlParseComment(htmlParserCtxtPtr ctxt, int bogus) {
SKIP(1);
comment = buf;
} else {
if ((!PARSER_PROGRESSIVE(ctxt)) &&
(ctxt->input->end - ctxt->input->cur < 2))
xmlParserGrow(ctxt);
if (CUR == '>') {
SKIP(1);
} else if ((CUR == '-') && (NXT(1) == '>')) {