aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-04-03 00:26:51 +0000
committerRoger Dingledine <arma@torproject.org>2006-04-03 00:26:51 +0000
commit7e3a98b4890d3e9a9de4cdbf26cd93158d3bc936 (patch)
tree0d842f5e840e535a5d4bd5783a4fb0c75cd06a8c /src/common/util.c
parente9dc188efdffd7f76163af9325e36628137d9ecc (diff)
downloadtor-7e3a98b4890d3e9a9de4cdbf26cd93158d3bc936.tar
tor-7e3a98b4890d3e9a9de4cdbf26cd93158d3bc936.tar.gz
"" is not a plausible address for addressmaps.
svn:r6299
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 6bee50b97..b2dd2f4b4 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1722,6 +1722,8 @@ is_plausible_address(const char *name)
const char *cp;
tor_assert(name);
/* We could check better here. */
+ if (!*name)
+ return 0;
for (cp=name; *cp; cp++) {
if (*cp != '.' && *cp != '-' && !TOR_ISALNUM(*cp))
return 0;