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:
@@ -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) == '>')) {
|
||||
|
Reference in New Issue
Block a user