summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-06-05 19:41:40 -0400
committerNick Mathewson <nickm@torproject.org>2009-06-05 19:41:40 -0400
commit20193fc7ab16f735f35a16368bfd83e2e565456e (patch)
tree085d25c2f5d7ba6f6b81ce41de9d0823849b80fd /src/or/policies.c
parent48bf1d97eeed9fd0812e281cbc1f08c6c5ade89c (diff)
downloadtor-20193fc7ab16f735f35a16368bfd83e2e565456e.tar.gz
tor-20193fc7ab16f735f35a16368bfd83e2e565456e.zip
Avoid a memory corruption problem related to "private" in DirPolicy.
This is a posible fix for bug 996.
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index cb914d11f6..d55e86c184 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -411,6 +411,7 @@ load_policy_from_option(config_line_t *config, smartlist_t **policy,
memcpy(&newp, n, sizeof(newp));
newp.prt_min = 1;
newp.prt_max = 65535;
+ newp.is_canonical = 0;
c = addr_policy_get_canonical_entry(&newp);
SMARTLIST_REPLACE_CURRENT(*policy, n, c);
addr_policy_free(n);