mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +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);
|
SKIP(1);
|
||||||
comment = buf;
|
comment = buf;
|
||||||
} else {
|
} else {
|
||||||
|
if ((!PARSER_PROGRESSIVE(ctxt)) &&
|
||||||
|
(ctxt->input->end - ctxt->input->cur < 2))
|
||||||
|
xmlParserGrow(ctxt);
|
||||||
|
|
||||||
if (CUR == '>') {
|
if (CUR == '>') {
|
||||||
SKIP(1);
|
SKIP(1);
|
||||||
} else if ((CUR == '-') && (NXT(1) == '>')) {
|
} else if ((CUR == '-') && (NXT(1) == '>')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user