aboutsummaryrefslogtreecommitdiff
path: root/src/or/addressmap.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-11 11:05:31 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-11 11:05:31 -0500
commit7b51667d638242b9e47bdd0d4357596c380f7c94 (patch)
tree45033c7cf87d8791ae2facc0185d7cf258ac517d /src/or/addressmap.c
parentb2663298e9179368d521d9088b2bbf0f12b490e2 (diff)
parentb08cfc65a78527cc97f4d0aeff3217d5f1c93e08 (diff)
downloadtor-7b51667d638242b9e47bdd0d4357596c380f7c94.tar.gz
tor-7b51667d638242b9e47bdd0d4357596c380f7c94.zip
Merge remote-tracking branch 'origin/maint-0.2.5'
Diffstat (limited to 'src/or/addressmap.c')
-rw-r--r--src/or/addressmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c
index 8ad24323b5..9d92eb7903 100644
--- a/src/or/addressmap.c
+++ b/src/or/addressmap.c
@@ -744,6 +744,12 @@ parse_virtual_addr_network(const char *val, sa_family_t family,
const int max_bits = ipv6 ? 40 : 16;
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 (msg)
tor_asprintf(msg, "Error parsing VirtualAddressNetwork%s %s",