aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 7ce578c4ff..10b43c77b1 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -437,8 +437,13 @@ dirserv_dump_directory_to_string(char *s, int maxlen,
/* These multiple strlcat calls are inefficient, but dwarfed by the RSA
signature.
*/
- if (strlcat(s, "directory-signature\n", maxlen) >= maxlen)
+ if (strlcat(s, "directory-signature ", maxlen) >= maxlen)
goto truncated;
+ if (strlcat(s, options.Nickname, maxlen) >= maxlen)
+ goto truncated;
+ if (strlcat(s, "\n", maxlen) >= maxlen)
+ goto truncated;
+
if (router_get_dir_hash(s,digest)) {
log_fn(LOG_WARN,"couldn't compute digest");