mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #289 from Dmitry-Me/fixNullPointerDereference
Fix null pointer dereference planted in PR287 and reported in PR288
This commit is contained in:
commit
0f922e7c9a
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue