summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-29 17:10:29 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-29 17:10:29 +0000
commite3d5e4fcae54adc1314521895b6cd1a8a4b6b267 (patch)
tree680238f0b87265921b4b757aa681d9725d28b243
parent2741dd5741a27a9e875bfc8713351a7a5de457d4 (diff)
downloadtor-e3d5e4fcae54adc1314521895b6cd1a8a4b6b267.tar.gz
tor-e3d5e4fcae54adc1314521895b6cd1a8a4b6b267.zip
Okay, now descriptors seem to be buildable.
svn:r9216
-rw-r--r--src/or/router.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 634ed4122b..ac723130e3 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1204,6 +1204,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
result = policy_write_item(s+written, maxlen-written, tmpe);
if (result < 0)
return -1;
+ tor_assert(result == (int)strlen(s+written));
written += result;
if (written+2 > maxlen)
return -1;
@@ -1214,7 +1215,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
return -1;
/* Sign the directory */
- strlcat(s+written, "router-signature\n", maxlen-written);
+ strlcpy(s+written, "router-signature\n", maxlen-written);
written += strlen(s+written);
s[written] = '\0';
if (router_get_router_hash(s, digest) < 0)