1
0
mirror of https://github.com/leethomason/tinyxml2.git synced 2026-07-21 19:23:00 +04:00

Add null check for format in TIXML_VSCPRINTF (#1064)

This commit is contained in:
sbaluja
2026-03-09 20:31:36 -04:00
committed by GitHub
parent 3324d04d58
commit e48a1310fe
+3
View File
@@ -114,6 +114,9 @@ distribution.
#define TIXML_VSNPRINTF vsnprintf
static inline int TIXML_VSCPRINTF( const char* format, va_list va )
{
if (!format) {
return 0;
}
int len = vsnprintf( 0, 0, format, va );
TIXMLASSERT( len >= 0 );
return len;