diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:39:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:39:45 -0400 |
commit | 9fba014e3f7f89520841b65b8b038e5fb931b1d6 (patch) | |
tree | 2197904844e7ae25b4a2d6465c2aa0cca1798019 /src/or/microdesc.c | |
parent | 6d5478a8a7734553fc84574e725625610f46dc8c (diff) | |
parent | 8fb38331c3213caef2d2e003e02cdb361504f14f (diff) | |
download | tor-9fba014e3f7f89520841b65b8b038e5fb931b1d6.tar.gz tor-9fba014e3f7f89520841b65b8b038e5fb931b1d6.zip |
Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023
Conflicts in various places, mainly node-related. Resolved them in
favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022.
src/common/Makefile.am
src/or/circuitlist.c
src/or/connection_edge.c
src/or/directory.c
src/or/microdesc.c
src/or/networkstatus.c
src/or/router.c
src/or/routerlist.c
src/test/test_util.c
Diffstat (limited to 'src/or/microdesc.c')
-rw-r--r-- | src/or/microdesc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 717488bded..f7f42a4dec 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -55,7 +55,7 @@ _microdesc_hash(microdesc_t *md) static INLINE int _microdesc_eq(microdesc_t *a, microdesc_t *b) { - return !memcmp(a->digest, b->digest, DIGEST256_LEN); + return tor_memeq(a->digest, b->digest, DIGEST256_LEN); } HT_PROTOTYPE(microdesc_map, microdesc_t, node, @@ -477,7 +477,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force) " with \"onion-key\". Instead I got %s.", (int)md->off, escaped(bad_str)); tor_free(bad_str); - tor_assert(!memcmp(md->body, "onion-key", 9)); + tor_assert(fast_memeq(md->body, "onion-key", 9)); } } SMARTLIST_FOREACH_END(md); |