aboutsummaryrefslogtreecommitdiff
path: root/common/xmlparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/xmlparser.h')
-rw-r--r--common/xmlparser.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/xmlparser.h b/common/xmlparser.h
index c3eb68ca78..0f859ecf14 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -333,16 +333,17 @@ protected:
return parserError("Malformed comment syntax.");
_char = _stream->readByte();
- bool dash = false;
while (_char) {
if (_char == '-') {
- if (dash && _stream->readByte() == '>') {
+ if (_stream->readByte() == '-') {
+
+ if (_stream->readByte() != '>')
+ return parserError("Malformed comment (double-hyphen inside comment body).");
+
_char = _stream->readByte();
return true;
}
-
- dash = !dash;
}
_char = _stream->readByte();