diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-12 19:27:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-12 19:27:18 -0400 |
commit | af85017177566a26d17076a256b3a4d5ae555170 (patch) | |
tree | e10d62291caa738067a23cfe2b43af4192575a13 /src/or/connection_edge.c | |
parent | 696cd1cfe25e064ed3ceacf5ea5c7b18264873c6 (diff) | |
parent | 9e16a418f92670ae713138701fa931567fb4983d (diff) | |
download | tor-af85017177566a26d17076a256b3a4d5ae555170.tar.gz tor-af85017177566a26d17076a256b3a4d5ae555170.zip |
Merge remote-tracking branch 'public/bug3122_memcmp_023'
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 4e45cbeff6..186137b1df 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -577,7 +577,7 @@ connection_ap_fail_onehop(const char *failed_digest, if (!edge_conn->want_onehop) continue; if (hexdigest_to_digest(edge_conn->chosen_exit_name, digest) < 0 || - memcmp(digest, failed_digest, DIGEST_LEN)) + tor_memneq(digest, failed_digest, DIGEST_LEN)) continue; if (tor_digest_is_zero(digest)) { /* we don't know the digest; have to compare addr:port */ @@ -3072,7 +3072,7 @@ connection_ap_can_use_exit(edge_connection_t *conn, const node_t *exit) if (conn->chosen_exit_name) { const node_t *chosen_exit = node_get_by_nickname(conn->chosen_exit_name, 1); - if (!chosen_exit || memcmp(chosen_exit->identity, + if (!chosen_exit || tor_memneq(chosen_exit->identity, exit->identity, DIGEST_LEN)) { /* doesn't match */ // log_debug(LD_APP,"Requested node '%s', considering node '%s'. No.", |