Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ZerXes
Tor
Commits
2845607f
Commit
2845607f
authored
May 17, 2019
by
rl1987
Committed by
Nick Mathewson
May 20, 2019
Browse files
In microdesc_cache_reload(), set journal length to length of string we read
Hopefully this will fix CID 1444769.
parent
49acbfad
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/feature/nodelist/microdesc.c
View file @
2845607f
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment