[or-cvs] fix redundant (and dangerous) NUL termination
Roger Dingledine
arma at seul.org
Thu Dec 2 04:16:21 UTC 2004
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
router.c
Log Message:
fix redundant (and dangerous) NUL termination
Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- router.c 29 Nov 2004 22:25:30 -0000 1.132
+++ router.c 2 Dec 2004 04:16:18 -0000 1.133
@@ -599,9 +599,8 @@
*/
void get_platform_str(char *platform, size_t len)
{
- tor_snprintf(platform, len-1, "Tor %s on %s",
+ tor_snprintf(platform, len, "Tor %s on %s",
VERSION, get_uname());
- platform[len-1] = '\0';
return;
}
More information about the tor-commits
mailing list