소스 검색

"" 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;