summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-12 19:27:18 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-12 19:27:18 -0400
commitaf85017177566a26d17076a256b3a4d5ae555170 (patch)
treee10d62291caa738067a23cfe2b43af4192575a13 /src/common/crypto.c
parent696cd1cfe25e064ed3ceacf5ea5c7b18264873c6 (diff)
parent9e16a418f92670ae713138701fa931567fb4983d (diff)
downloadtor-af85017177566a26d17076a256b3a4d5ae555170.tar.gz
tor-af85017177566a26d17076a256b3a4d5ae555170.zip
Merge remote-tracking branch 'public/bug3122_memcmp_023'
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 424fd09b6c..3de6fdded2 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -933,7 +933,7 @@ crypto_pk_public_checksig_digest(crypto_pk_env_t *env, const char *data,
tor_free(buf);
return -1;
}
- if (memcmp(buf, digest, DIGEST_LEN)) {
+ if (tor_memneq(buf, digest, DIGEST_LEN)) {
log_warn(LD_CRYPTO, "Signature mismatched with digest.");
tor_free(buf);
return -1;