[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix redundant (and dangerous) NUL termination
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;
}