diff options
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); |