diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-08-17 11:54:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-08-17 11:54:05 -0400 |
commit | 274e2817419e9b785f890fe04d791ed9114a8725 (patch) | |
tree | 6092543a1ab750d2058e89b2a10580a7682d434f | |
parent | cdd882ee71fb2966854fe271d9896b7bf389b35c (diff) | |
parent | f25e8d034b78be01c9fbe659d4686fc370083572 (diff) | |
download | tor-274e2817419e9b785f890fe04d791ed9114a8725.tar.gz tor-274e2817419e9b785f890fe04d791ed9114a8725.zip |
Merge remote-tracking branch 'origin/maint-0.2.3'
-rw-r--r-- | changes/bug6514 | 5 | ||||
-rw-r--r-- | src/or/dirvote.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/changes/bug6514 b/changes/bug6514 new file mode 100644 index 0000000000..84633bd279 --- /dev/null +++ b/changes/bug6514 @@ -0,0 +1,5 @@ + o Minor bugfixes: + - Add a (probably redundant) memory clear between iterations of + the router status voting loop, to prevent future coding errors + where data might leak between iterations of the loop. Resolves + ticket 6514. diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 79958739a5..bc7797355c 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -1752,6 +1752,7 @@ networkstatus_compute_consensus(smartlist_t *votes, rs = compute_routerstatus_consensus(matching_descs, consensus_method, microdesc_digest); /* Copy bits of that into rs_out. */ + memset(&rs_out, 0, sizeof(rs_out)); tor_assert(fast_memeq(lowest_id, rs->status.identity_digest,DIGEST_LEN)); memcpy(rs_out.identity_digest, lowest_id, DIGEST_LEN); memcpy(rs_out.descriptor_digest, rs->status.descriptor_digest, |