mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
whoops
just because it says snprintf doesn't mean it's a noop svn:r3071
This commit is contained in:
parent
fc87758ff3
commit
675f60aa13
@ -1052,8 +1052,9 @@ router_parse_addr_policy(directory_token_t *tok) {
|
|||||||
newe = tor_malloc_zero(sizeof(addr_policy_t));
|
newe = tor_malloc_zero(sizeof(addr_policy_t));
|
||||||
|
|
||||||
newe->string = tor_malloc(8+strlen(arg));
|
newe->string = tor_malloc(8+strlen(arg));
|
||||||
// tor_snprintf(newe->string, 8+strlen(arg), "%s %s",
|
/* XXX eventually, use the code from router.c:727 to generate this */
|
||||||
// (tok->tp == K_REJECT) ? "reject" : "accept", arg);
|
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
|
newe->policy_type = (tok->tp == K_REJECT) ? ADDR_POLICY_REJECT
|
||||||
: ADDR_POLICY_ACCEPT;
|
: ADDR_POLICY_ACCEPT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user