diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-03 16:22:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-03 16:22:31 -0400 |
commit | 698fa0fc67118bea2ea7720455ebbdee705c8c1a (patch) | |
tree | 5de48e0bac3e0a4abc6e3098ad16d454cf98cb3e /src/or/microdesc.c | |
parent | 033c27ac5ea02fa1a44651c5a324cb78e787f1a3 (diff) | |
download | tor-698fa0fc67118bea2ea7720455ebbdee705c8c1a.tar.gz tor-698fa0fc67118bea2ea7720455ebbdee705c8c1a.zip |
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".
Diffstat (limited to 'src/or/microdesc.c')
-rw-r--r-- | src/or/microdesc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 2c4b3435f7..356627700d 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -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); |