From 5883b96f6aa0cd728aa078d039143484b9fd7bb8 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Mon, 4 Nov 2019 11:06:32 +0100 Subject: [PATCH] Handle unterminated comment in XML parser (#270) Signed-off-by: Erik Boasson --- src/ddsrt/src/xmlparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ddsrt/src/xmlparser.c b/src/ddsrt/src/xmlparser.c index c497624..828d40e 100644 --- a/src/ddsrt/src/xmlparser.c +++ b/src/ddsrt/src/xmlparser.c @@ -500,7 +500,7 @@ static int skip_comment (struct ddsrt_xmlp_state *st) if (!peek_chars (st, "", 0)) { + while (peek_char (st) != TOK_EOF && (peek_char (st) != '-' || !peek_chars (st, "-->", 0))) { next_char (st); } if (peek_chars (st, "-->", 1)) {