summaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-25 11:38:24 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-25 11:38:24 -0400
commit6069c829f90576c04a0802d2a108378a2bbabb7a (patch)
treeaaaf670a9e79384e0d83f5b8a04738636fef9566 /src/or/rendcommon.c
parent10b242822490c9873138565bcc8a3565a7dc7014 (diff)
parent418f3d6298beb27e050618e2f59e01d6d3b2f45b (diff)
downloadtor-6069c829f90576c04a0802d2a108378a2bbabb7a.tar.gz
tor-6069c829f90576c04a0802d2a108378a2bbabb7a.zip
Merge branch 'bug19418_029' into maint-0.3.1
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index e1236bdd0f..d18356e67a 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -477,7 +477,10 @@ rend_encode_v2_descriptors(smartlist_t *descs_out,
tor_assert(descriptor_cookie);
}
/* Obtain service_id from public key. */
- crypto_pk_get_digest(service_key, service_id);
+ if (crypto_pk_get_digest(service_key, service_id) < 0) {
+ log_warn(LD_BUG, "Couldn't compute service key digest.");
+ return -1;
+ }
/* Calculate current time-period. */
time_period = get_time_period(now, period, service_id);
/* Determine how many seconds the descriptor will be valid. */