浏览代码

guard->nickname is never NULL.

Nick Mathewson 7 年之前
父节点
当前提交
4ec9751c14
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/or/entrynodes.c

+ 1 - 1
src/or/entrynodes.c

@@ -341,7 +341,7 @@ entry_guard_describe(const entry_guard_t *guard)
   static char buf[256];
   tor_snprintf(buf, sizeof(buf),
                "%s ($%s)",
-               guard->nickname ? guard->nickname : "[bridge]",
+               strlen(guard->nickname) ? guard->nickname : "[bridge]",
                hex_str(guard->identity, DIGEST_LEN));
   return buf;
 }