diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-16 10:44:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-16 10:44:24 -0400 |
commit | 2ca827104db2425bdb7f854c7b20d102706d559a (patch) | |
tree | 059a9480e1a78cff769371a0820e708736c817c8 /src/or/consdiffmgr.c | |
parent | 222534d35414d185bc5c417d7a46569cc7cf7a84 (diff) | |
download | tor-2ca827104db2425bdb7f854c7b20d102706d559a.tar.gz tor-2ca827104db2425bdb7f854c7b20d102706d559a.zip |
Report deleted consensuses as NOT_FOUND rather than AVAILABLE
This bug happened because of a bogus pointer check in
consdiffmgr_find_consensus(), not in any released Tor.
Fixes CID 1409670. Good catch, Coverity!
Diffstat (limited to 'src/or/consdiffmgr.c')
-rw-r--r-- | src/or/consdiffmgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c index 72a4f01dd8..a8df077001 100644 --- a/src/or/consdiffmgr.c +++ b/src/or/consdiffmgr.c @@ -577,7 +577,7 @@ consdiffmgr_find_consensus(struct consensus_cache_entry_t **entry_out, if (!handle) return CONSDIFF_NOT_FOUND; *entry_out = consensus_cache_entry_handle_get(handle); - if (entry_out) + if (*entry_out) return CONSDIFF_AVAILABLE; else return CONSDIFF_NOT_FOUND; |