[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] guard->nickname is never NULL.



commit 4ec9751c144465f6f70450545d68372f35f2ba78
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Dec 16 11:25:59 2016 -0500

    guard->nickname is never NULL.
---
 src/or/entrynodes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 4c68247..ee904ac 100644
--- a/src/or/entrynodes.c
+++ b/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;
 }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits