diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:27:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:27:27 -0400 |
commit | 0cbcbc3412b667537b6ec54da0a4c9173a19d6de (patch) | |
tree | 6cf0e59b26854a49be2326d49f57189a48e31b60 /src/or/dirvote.c | |
parent | 9964c314c6c6af4b921875c973f28f8d01b2e9a2 (diff) | |
download | tor-0cbcbc3412b667537b6ec54da0a4c9173a19d6de.tar.gz tor-0cbcbc3412b667537b6ec54da0a4c9173a19d6de.zip |
Re-apply the automated conversion to 0.2.2 to make handle any memcmps that snuck in
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 a95cea4b7d..a017cfbb37 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 (!memcmp(target->digests.d[alg], digests->d[alg], DIGEST256_LEN)) { + if (tor_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 && !memcmp(mstr, cp, mlen)) { + if (num_len == mlen && tor_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 |