Skip to content

Commit 1ab5a34

Browse files
authored
Additional fixes for tinyxml
1 parent 5d690de commit 1ab5a34

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vendor/cegui-0.4.0-custom/src/tinyxml/tinyxmlparser.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
261261
else
262262
{ p +=3; ++col; } // A normal character.
263263
}
264+
else
265+
{
266+
// TIXML_UTF_LEAD_0 (239) is the start character of a 3 byte sequence, so
267+
// there is something wrong here. Just advance the pointer to evade infinite loops
268+
++p;
269+
}
264270
}
265271
else
266272
{
@@ -1478,6 +1484,10 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
14781484
}
14791485

14801486
p = SkipWhiteSpace( p, _encoding );
1487+
if ( !p || !*p )
1488+
{
1489+
break;
1490+
}
14811491
if ( StringEqual( p, "version", true, _encoding ) )
14821492
{
14831493
TiXmlAttribute attrib;

0 commit comments

Comments
 (0)