aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-27 06:03:28 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-27 06:03:28 +0000
commitf67f83b1facdb6515fb0996fd70d172df37d5962 (patch)
treedd45daf4d906587786b82ae43b5e4584bc0e21cb /src/or/dirserv.c
parentbc62f8e983e913c8a37f3412466b8bc9d360b614 (diff)
downloadtor-f67f83b1facdb6515fb0996fd70d172df37d5962.tar
tor-f67f83b1facdb6515fb0996fd70d172df37d5962.tar.gz
Use strlcpy, not strncpy
svn:r2603
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index d78ab7c45..f10817846 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -386,9 +386,7 @@ dirserv_add_descriptor(const char **desc)
ent->nickname = tor_strdup(ri->nickname);
ent->published = ri->published_on;
ent->desc_len = desc_len;
- ent->descriptor = tor_malloc(desc_len+1);
- strncpy(ent->descriptor, start, desc_len);
- ent->descriptor[desc_len] = '\0';
+ ent->descriptor = tor_strndup(start,desc_len);
ent->router = ri;
/* XXX008 is ent->verified useful/used for anything? */
ent->verified = verified; /* XXXX008 support other possibilities. */