Skip to content

Commit faf6824

Browse files
committed
Copy 1ab5a34 to our tinyxml copy at /vendor/
1 parent 1ab5a34 commit faf6824

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vendor/tinyxml/tinyxmlparser.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
274274
else
275275
{ p +=3; ++col; } // A normal character.
276276
}
277+
else
278+
{
279+
// TIXML_UTF_LEAD_0 (239) is the start character of a 3 byte sequence, so
280+
// there is something wrong here. Just advance the pointer to evade infinite loops
281+
++p;
282+
}
277283
}
278284
else
279285
{
@@ -1602,6 +1608,10 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
16021608
}
16031609

16041610
p = SkipWhiteSpace( p, _encoding );
1611+
if ( !p || !*p )
1612+
{
1613+
break;
1614+
}
16051615
if ( StringEqual( p, "version", true, _encoding ) )
16061616
{
16071617
TiXmlAttribute attrib;

0 commit comments

Comments
 (0)