mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Only update view of micrdescriptor pos if pos is fetchable.
It's conceivable (but probably impossible given our code) that lseek could return -1 on an error; when that happens, we don't want off to become -1. Fixes CID 1035124.
This commit is contained in:
parent
a7410c9199
commit
23dae51976
@ -475,7 +475,8 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
|
||||
"By my count, I'm at "I64_FORMAT
|
||||
", but I should be at "I64_FORMAT,
|
||||
I64_PRINTF_ARG(off), I64_PRINTF_ARG(off_real));
|
||||
off = off_real;
|
||||
if (off_real >= 0)
|
||||
off = off_real;
|
||||
}
|
||||
if (md->saved_location != SAVED_IN_CACHE) {
|
||||
tor_free(md->body);
|
||||
|
Loading…
Reference in New Issue
Block a user