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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 1ba051585..722648877 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -871,9 +871,11 @@ dirserv_dump_directory_to_string(char **dir_out,
SMARTLIST_FOREACH(rl->routers, routerinfo_t *, ri,
{
size_t len = ri->cache_info.signed_descriptor_len;
+ const char *body;
if (cp+len+1 >= buf+buf_len)
goto truncated;
- memcpy(cp, ri->cache_info.signed_descriptor, len);
+ body = signed_descriptor_get_body(&ri->cache_info);
+ memcpy(cp, body, len);
cp += len;
*cp++ = '\n'; /* add an extra newline in case somebody was depending on
* it. */