mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Avoid a memory corruption problem related to "private" in DirPolicy.
This is a posible fix for bug 996.
This commit is contained in:
parent
48bf1d97ee
commit
20193fc7ab
@ -88,6 +88,9 @@ Changes in version 0.2.1.14-rc - 2009-04-12
|
|||||||
patch by Sebastian.
|
patch by Sebastian.
|
||||||
- Avoid crashing in the presence of certain malformed descriptors.
|
- Avoid crashing in the presence of certain malformed descriptors.
|
||||||
Found by lark, and by automated fuzzing.
|
Found by lark, and by automated fuzzing.
|
||||||
|
- Avoid crashing when we have "private" in a policy specified in
|
||||||
|
a DirPolicy or SocksPolicy or ReachableAddresses option and we
|
||||||
|
re-load the policy. May fix bug 996.
|
||||||
|
|
||||||
o Minor features:
|
o Minor features:
|
||||||
- When generating circuit events with verbose nicknames for
|
- When generating circuit events with verbose nicknames for
|
||||||
|
@ -411,6 +411,7 @@ load_policy_from_option(config_line_t *config, smartlist_t **policy,
|
|||||||
memcpy(&newp, n, sizeof(newp));
|
memcpy(&newp, n, sizeof(newp));
|
||||||
newp.prt_min = 1;
|
newp.prt_min = 1;
|
||||||
newp.prt_max = 65535;
|
newp.prt_max = 65535;
|
||||||
|
newp.is_canonical = 0;
|
||||||
c = addr_policy_get_canonical_entry(&newp);
|
c = addr_policy_get_canonical_entry(&newp);
|
||||||
SMARTLIST_REPLACE_CURRENT(*policy, n, c);
|
SMARTLIST_REPLACE_CURRENT(*policy, n, c);
|
||||||
addr_policy_free(n);
|
addr_policy_free(n);
|
||||||
|
Loading…
Reference in New Issue
Block a user