瀏覽代碼

"" is not a plausible address for addressmaps.

svn:r6299
Roger Dingledine 19 年之前
父節點
當前提交
7e3a98b489
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;
   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;