(trunk libT) NULL ptr safeguard
This commit is contained in:
parent
5d15ee8439
commit
35515ee424
|
@ -422,7 +422,7 @@ tr_strip_positional_args( const char* str )
|
||||||
const char * in = str;
|
const char * in = str;
|
||||||
static size_t bufsize = 0;
|
static size_t bufsize = 0;
|
||||||
static char * buf = NULL;
|
static char * buf = NULL;
|
||||||
const size_t len = strlen( str );
|
const size_t len = str ? strlen( str ) : 0;
|
||||||
char * out;
|
char * out;
|
||||||
|
|
||||||
if( !buf || ( bufsize < len ) )
|
if( !buf || ( bufsize < len ) )
|
||||||
|
|
Loading…
Reference in New Issue