1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

(trunk libT) more NULL ptr safeguards

This commit is contained in:
Jordan Lee 2011-01-27 18:54:25 +00:00
parent 0c69ad0a80
commit f2f08f5469

View file

@ -431,7 +431,7 @@ tr_strip_positional_args( const char* str )
buf = tr_renew( char, buf, bufsize );
}
for( out = buf; *str; ++str )
for( out = buf; str && *str; ++str )
{
*out++ = *str;
@ -450,7 +450,7 @@ tr_strip_positional_args( const char* str )
}
*out = '\0';
return strcmp( buf, in ) ? buf : in;
return !in || strcmp( buf, in ) ? buf : in;
}
/**