[tor-commits] [tor/master] Fix coverity cid 1405510
nickm at torproject.org
nickm at torproject.org
Wed Apr 26 12:48:27 UTC 2017
commit ee478bdf385b052783c2edfb1b21dc500cf0d9d5
Author: Sebastian Hahn <sebastian at torproject.org>
Date: Wed Apr 26 08:45:38 2017 +0200
Fix coverity cid 1405510
This is a false positive, but let's appease coverity.
---
src/or/consdiffmgr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index 59d0f28..a57edf9 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -666,6 +666,10 @@ consdiffmgr_validate(void)
if (r < 0)
continue;
+ // Deconfuse coverity about the possibility of sha3_received being
+ // uninitialized
+ tor_assert(r <= 0);
+
if (fast_memneq(sha3_received, sha3_expected, DIGEST256_LEN)) {
problems = 1;
consensus_cache_entry_mark_for_removal(obj);
More information about the tor-commits
mailing list