[or-cvs] whoops
Roger Dingledine
arma at seul.org
Sat Dec 4 01:23:07 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:
routerparse.c
Log Message:
whoops
just because it says snprintf doesn't mean it's a noop
Index: routerparse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- routerparse.c 4 Dec 2004 01:14:36 -0000 1.93
+++ routerparse.c 4 Dec 2004 01:23:04 -0000 1.94
@@ -1052,8 +1052,9 @@
newe = tor_malloc_zero(sizeof(addr_policy_t));
newe->string = tor_malloc(8+strlen(arg));
-// tor_snprintf(newe->string, 8+strlen(arg), "%s %s",
-// (tok->tp == K_REJECT) ? "reject" : "accept", arg);
+ /* XXX eventually, use the code from router.c:727 to generate this */
+ tor_snprintf(newe->string, 8+strlen(arg), "%s %s",
+ (tok->tp == K_REJECT) ? "reject" : "accept", arg);
newe->policy_type = (tok->tp == K_REJECT) ? ADDR_POLICY_REJECT
: ADDR_POLICY_ACCEPT;
More information about the tor-commits
mailing list