aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/microdesc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/nodelist/microdesc.c')
-rw-r--r--src/feature/nodelist/microdesc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c
index db2149754a..89ac0a2f83 100644
--- a/src/feature/nodelist/microdesc.c
+++ b/src/feature/nodelist/microdesc.c
@@ -536,8 +536,8 @@ microdesc_cache_reload(microdesc_cache_t *cache)
journal_content = read_file_to_str(cache->journal_fname,
RFTS_IGNORE_MISSING, &st);
if (journal_content) {
- cache->journal_len = (size_t) st.st_size;
- warn_if_nul_found(journal_content, cache->journal_len, 0,
+ cache->journal_len = strlen(journal_content);
+ warn_if_nul_found(journal_content, (size_t)st.st_size, 0,
"reading microdesc journal");
added = microdescs_add_to_cache(cache, journal_content,
journal_content+st.st_size,