aboutsummaryrefslogtreecommitdiff
path: root/src/feature/rend/rendcommon.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-02-26 12:33:23 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2019-02-26 12:33:23 +0200
commit7fbfdf2af731f500e3df3ca8207e6822f87f1bc9 (patch)
tree7dd1beac6cc0854d7b4930ec111ec0cb261cb588 /src/feature/rend/rendcommon.c
parent626e6d2c394673ca46a44616a76b33699d0cf763 (diff)
parentf632335feb27b45a3ee5eb64690826bda52467bd (diff)
downloadtor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.tar.gz
tor-7fbfdf2af731f500e3df3ca8207e6822f87f1bc9.zip
Merge branch 'tor-github/pr/611'
Diffstat (limited to 'src/feature/rend/rendcommon.c')
-rw-r--r--src/feature/rend/rendcommon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/rend/rendcommon.c b/src/feature/rend/rendcommon.c
index de48af795f..5cc054f454 100644
--- a/src/feature/rend/rendcommon.c
+++ b/src/feature/rend/rendcommon.c
@@ -171,9 +171,10 @@ rend_compute_v2_desc_id(char *desc_id_out, const char *service_id,
}
/* Convert service ID to binary. */
if (base32_decode(service_id_binary, REND_SERVICE_ID_LEN,
- service_id, REND_SERVICE_ID_LEN_BASE32) < 0) {
+ service_id, REND_SERVICE_ID_LEN_BASE32) !=
+ REND_SERVICE_ID_LEN) {
log_warn(LD_REND, "Could not compute v2 descriptor ID: "
- "Illegal characters in service ID: %s",
+ "Illegal characters or wrong length for service ID: %s",
safe_str_client(service_id));
return -1;
}