Loading changes/bug14142-parse-virtual-addr 0 → 100644 +7 −0 Original line number Original line Diff line number Diff line o Minor bugfixes (client): - Check for a missing option value in parse_virtual_addr_network before asserting on the NULL in tor_addr_parse_mask_ports. This avoids crashing on torrc lines like Vi[rtualAddrNetworkIPv[4|6]] when no value follows the option. Bugfix on 0.2.3 (de4cc126cbb5 on 24 November 2012), fixes #14142. Patch by "teor". src/or/addressmap.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -744,6 +744,12 @@ parse_virtual_addr_network(const char *val, sa_family_t family, const int max_bits = ipv6 ? 40 : 16; const int max_bits = ipv6 ? 40 : 16; virtual_addr_conf_t *conf = ipv6 ? &virtaddr_conf_ipv6 : &virtaddr_conf_ipv4; virtual_addr_conf_t *conf = ipv6 ? &virtaddr_conf_ipv6 : &virtaddr_conf_ipv4; if (!val || val[0] == '\0') { if (msg) tor_asprintf(msg, "Value not present (%s) after VirtualAddressNetwork%s", val?"Empty":"NULL", ipv6?"IPv6":""); return -1; } if (tor_addr_parse_mask_ports(val, 0, &addr, &bits, NULL, NULL) < 0) { if (tor_addr_parse_mask_ports(val, 0, &addr, &bits, NULL, NULL) < 0) { if (msg) if (msg) tor_asprintf(msg, "Error parsing VirtualAddressNetwork%s %s", tor_asprintf(msg, "Error parsing VirtualAddressNetwork%s %s", Loading Loading
changes/bug14142-parse-virtual-addr 0 → 100644 +7 −0 Original line number Original line Diff line number Diff line o Minor bugfixes (client): - Check for a missing option value in parse_virtual_addr_network before asserting on the NULL in tor_addr_parse_mask_ports. This avoids crashing on torrc lines like Vi[rtualAddrNetworkIPv[4|6]] when no value follows the option. Bugfix on 0.2.3 (de4cc126cbb5 on 24 November 2012), fixes #14142. Patch by "teor".
src/or/addressmap.c +6 −0 Original line number Original line Diff line number Diff line Loading @@ -744,6 +744,12 @@ parse_virtual_addr_network(const char *val, sa_family_t family, const int max_bits = ipv6 ? 40 : 16; const int max_bits = ipv6 ? 40 : 16; virtual_addr_conf_t *conf = ipv6 ? &virtaddr_conf_ipv6 : &virtaddr_conf_ipv4; virtual_addr_conf_t *conf = ipv6 ? &virtaddr_conf_ipv6 : &virtaddr_conf_ipv4; if (!val || val[0] == '\0') { if (msg) tor_asprintf(msg, "Value not present (%s) after VirtualAddressNetwork%s", val?"Empty":"NULL", ipv6?"IPv6":""); return -1; } if (tor_addr_parse_mask_ports(val, 0, &addr, &bits, NULL, NULL) < 0) { if (tor_addr_parse_mask_ports(val, 0, &addr, &bits, NULL, NULL) < 0) { if (msg) if (msg) tor_asprintf(msg, "Error parsing VirtualAddressNetwork%s %s", tor_asprintf(msg, "Error parsing VirtualAddressNetwork%s %s", Loading