diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:32:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:32:30 -0400 |
commit | 8fb38331c3213caef2d2e003e02cdb361504f14f (patch) | |
tree | a88cbac5893169b1a955543828b2db0aa85d00bb /src/or/dirvote.c | |
parent | 0cbcbc3412b667537b6ec54da0a4c9173a19d6de (diff) | |
download | tor-8fb38331c3213caef2d2e003e02cdb361504f14f.tar.gz tor-8fb38331c3213caef2d2e003e02cdb361504f14f.zip |
Hand-tune the new tor_memcmp instances in 0.2.2
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index a017cfbb37..dd156bd9d9 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -2211,7 +2211,7 @@ networkstatus_add_detached_signatures(networkstatus_t *target, } for (alg = DIGEST_SHA1; alg < N_DIGEST_ALGORITHMS; ++alg) { if (!tor_mem_is_zero(digests->d[alg], DIGEST256_LEN)) { - if (tor_memeq(target->digests.d[alg], digests->d[alg], DIGEST256_LEN)) { + if (fast_memeq(target->digests.d[alg], digests->d[alg], DIGEST256_LEN)) { ++n_matches; } else { *msg_out = "Mismatched digest."; @@ -3615,7 +3615,7 @@ vote_routerstatus_find_microdesc_hash(char *digest256_out, * the first part. */ while (1) { num_len = strspn(cp, "1234567890"); - if (num_len == mlen && tor_memeq(mstr, cp, mlen)) { + if (num_len == mlen && fast_memeq(mstr, cp, mlen)) { /* This is the line. */ char buf[BASE64_DIGEST256_LEN+1]; /* XXXX ignores extraneous stuff if the digest is too long. This |