Browse Source

"" is not a plausible address for addressmaps.

svn:r6299
Roger Dingledine 19 years ago
parent
commit
7e3a98b489
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/common/util.c

+ 2 - 0
src/common/util.c

@@ -1722,6 +1722,8 @@ is_plausible_address(const char *name)
   const char *cp;
   const char *cp;
   tor_assert(name);
   tor_assert(name);
   /* We could check better here. */
   /* We could check better here. */
+  if (!*name)
+    return 0;
   for (cp=name; *cp; cp++) {
   for (cp=name; *cp; cp++) {
     if (*cp != '.' && *cp != '-' && !TOR_ISALNUM(*cp))
     if (*cp != '.' && *cp != '-' && !TOR_ISALNUM(*cp))
       return 0;
       return 0;