aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorChelsea H. Komlo <chelsea.komlo@gmail.com>2016-11-17 22:45:24 -0500
committerChelsea H. Komlo <chelsea.komlo@gmail.com>2016-11-24 10:01:03 -0500
commit276d07a88a3b595aff9e28c7f1862563d2751b55 (patch)
treec5e66e2eecad627ba0d1ac02b19b040fea467350 /src/or/routerparse.c
parent4614f8e6816d559f8fbe9ae0f42d751d3fb95c77 (diff)
downloadtor-276d07a88a3b595aff9e28c7f1862563d2751b55.tar.gz
tor-276d07a88a3b595aff9e28c7f1862563d2751b55.zip
crypto_digest returns expected error value of -1
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 2cfd3fc58a..8f8d2b8cd9 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -4536,7 +4536,7 @@ router_get_hash_impl(const char *s, size_t s_len, char *digest,
return -1;
if (alg == DIGEST_SHA1) {
- if (crypto_digest(digest, start, end-start)) {
+ if (crypto_digest(digest, start, end-start) < 0) {
log_warn(LD_BUG,"couldn't compute digest");
return -1;
}