mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-06-05 14:13:43 +00:00
Fix null pointer dereference planted in PR287 and reported in PR288
This commit is contained in:
parent
f12ece06fa
commit
9fcb876d3b
@ -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…
x
Reference in New Issue
Block a user