projects
/
transmission
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c69ad0
)
(trunk libT) more NULL ptr safeguards
author
Jordan Lee
<jordan@transmissionbt.com>
Thu, 27 Jan 2011 18:54:25 +0000
(18:54 +0000)
committer
Jordan Lee
<jordan@transmissionbt.com>
Thu, 27 Jan 2011 18:54:25 +0000
(18:54 +0000)
libtransmission/utils.c
patch
|
blob
|
history
diff --git
a/libtransmission/utils.c
b/libtransmission/utils.c
index 2c179fb13c9e3eb7b81a2456d74b705605f7d1fa..507bfa83aff98ba0f9b8b161dfe4d60aa726ec99 100644
(file)
--- a/
libtransmission/utils.c
+++ b/
libtransmission/utils.c
@@
-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;
}
/**