mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(trunk libT) more NULL ptr safeguards
This commit is contained in:
parent
0c69ad0a80
commit
f2f08f5469
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue