File tree Expand file tree Collapse file tree
src/aws-cpp-sdk-core/source/external/tinyxml2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ This file has been modified from its original version by Amazon:
119119 #define TIXML_VSNPRINTF vsnprintf
120120 static inline int TIXML_VSCPRINTF ( const char * format, va_list va )
121121 {
122+ if (!format) {
123+ return 0 ;
124+ }
122125 int len = vsnprintf ( 0 , 0 , format, va );
123126 TIXMLASSERT ( len >= 0 );
124127 return len;
@@ -2356,8 +2359,10 @@ static FILE* callfopen( const char* filepath, const char* mode )
23562359}
23572360
23582361void XMLDocument::DeleteNode ( XMLNode* node ) {
2359- TIXMLASSERT ( node );
2360- TIXMLASSERT (node->_document == this );
2362+ if (node == 0 ) {
2363+ return ; // check for null pointer
2364+ }
2365+ TIXMLASSERT (node->_document == this );
23612366 if (node->_parent ) {
23622367 node->_parent ->DeleteChild ( node );
23632368 }
You can’t perform that action at this time.
0 commit comments