Handle unterminated comment in XML parser (#270)
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
d545551a60
commit
5883b96f6a
1 changed files with 1 additions and 1 deletions
|
@ -500,7 +500,7 @@ static int skip_comment (struct ddsrt_xmlp_state *st)
|
||||||
if (!peek_chars (st, "<!--", 1)) {
|
if (!peek_chars (st, "<!--", 1)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
while ((peek_char (st) != TOK_EOF && peek_char (st) != '-') || !peek_chars (st, "-->", 0)) {
|
while (peek_char (st) != TOK_EOF && (peek_char (st) != '-' || !peek_chars (st, "-->", 0))) {
|
||||||
next_char (st);
|
next_char (st);
|
||||||
}
|
}
|
||||||
if (peek_chars (st, "-->", 1)) {
|
if (peek_chars (st, "-->", 1)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue