Merge pull request #289 from Dmitry-Me/fixNullPointerDereference

Fix null pointer dereference planted in PR287 and reported in PR288
This commit is contained in:
Lee Thomason 2015-03-05 10:36:31 -08:00
commit 0f922e7c9a
1 changed files with 5 additions and 0 deletions

View File

@ -520,6 +520,8 @@ char* XMLDocument::Identify( char* p, XMLNode** node )
char* const start = p;
p = XMLUtil::SkipWhiteSpace( p );
if( !*p ) {
*node = 0;
TIXMLASSERT( p );
return p;
}
@ -848,6 +850,9 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
XMLNode* node = 0;
p = _document->Identify( p, &node );
if ( node == 0 ) {
break;
}
StrPair endTag;
p = node->ParseDeep( p, &endTag );