Add missing code to set cache->journal_len when reading microdesc journal

This could be one reason that authorities' journals would grow without
bound; related to bug 2230. Bugfix on 0.2.2.6-alpha.  Fix by
"cypherpunks".
This commit is contained in:
Nick Mathewson
2011-05-03 16:22:31 -04:00
parent 033c27ac5e
commit 698fa0fc67
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -261,6 +261,7 @@ 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;
added = microdescs_add_to_cache(cache, journal_content,
journal_content+st.st_size,
SAVED_IN_JOURNAL, 0);