From a99e3e3fa64eebe5b427edcc193ad01fb75cd222 Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Sun, 15 Feb 2009 14:00:41 +0000 Subject: Merged rev 38209 from 0.13 to trunk: XML parsing fix svn-id: r38241 --- common/xmlparser.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'common') 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(); -- cgit v1.2.3