summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-08-28 00:00:32 +0000
committerNick Mathewson <nickm@torproject.org>2007-08-28 00:00:32 +0000
commita4cc3e4be1c297f6b77d151e0d21b2373c72ac7d (patch)
treea0f9e3a73f43b68292a6fc3b706929bbe4609831 /src/or/circuitbuild.c
parent79a3fed30e953285be083c67f0a871b09153fbd2 (diff)
downloadtor-a4cc3e4be1c297f6b77d151e0d21b2373c72ac7d.tar.gz
tor-a4cc3e4be1c297f6b77d151e0d21b2373c72ac7d.zip
r14821@catbus: nickm | 2007-08-27 19:57:56 -0400
Check for absent nickname when making extend info. I still dont know when this happens, but it is easy enough to check for. Fixes bug 467. svn:r11293
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 8df5908201..972d48951a 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1740,7 +1740,8 @@ extend_info_alloc(const char *nickname, const char *digest,
{
extend_info_t *info = tor_malloc_zero(sizeof(extend_info_t));
memcpy(info->identity_digest, digest, DIGEST_LEN);
- strlcpy(info->nickname, nickname, sizeof(info->nickname));
+ if (nickname)
+ strlcpy(info->nickname, nickname, sizeof(info->nickname));
if (onion_key)
info->onion_key = crypto_pk_dup_key(onion_key);
info->addr = addr;