diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-26 11:08:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-26 11:08:19 -0400 |
commit | beb9097beda7cc82eec744878a2efd2810351158 (patch) | |
tree | bf3638694718edda8b060f5dad3c35dce9f7da33 /src/common/crypto.c | |
parent | 34f12437d42bf8cf04763e851b54d6a96470e288 (diff) | |
parent | 4a1a89be0cd1abbd2aa4746038f52cd0dcffa65a (diff) | |
download | tor-beb9097beda7cc82eec744878a2efd2810351158.tar.gz tor-beb9097beda7cc82eec744878a2efd2810351158.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 0076c1d35b..0763a2c8c5 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1690,6 +1690,10 @@ crypto_digest_get_digest(crypto_digest_env_t *digest, SHA256_Final(r, &tmpenv.d.sha2); break; default: + log_warn(LD_BUG, "Called with unknown algorithm %d", digest->algorithm); + /* If fragile_assert is not enabled, then we should at least not + * leak anything. */ + memset(r, 0xff, sizeof(r)); tor_fragile_assert(); break; } |