summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-06-16 14:38:08 -0700
committerNick Mathewson <nickm@torproject.org>2020-10-07 08:35:12 -0400
commit884cad3edffb644a3da8b1e7e704678225cfe4ac (patch)
treece02ee3a92c32c0c3425796cf6bab90b9e00f105 /src
parent3e9fa5a029af55a0175b106199a5371fd87c8e4a (diff)
downloadtor-884cad3edffb644a3da8b1e7e704678225cfe4ac.tar.gz
tor-884cad3edffb644a3da8b1e7e704678225cfe4ac.zip
Make HSFETCH take the decoded length into account, not the base32 one
Diffstat (limited to 'src')
-rw-r--r--src/feature/control/control_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c
index 8259c3b353..b3f61549ad 100644
--- a/src/feature/control/control_cmd.c
+++ b/src/feature/control/control_cmd.c
@@ -1430,7 +1430,7 @@ handle_control_hsfetch(control_connection_t *conn,
rend_valid_descriptor_id(arg1 + v2_str_len) &&
base32_decode(digest, sizeof(digest), arg1 + v2_str_len,
REND_DESC_ID_V2_LEN_BASE32) ==
- REND_DESC_ID_V2_LEN_BASE32) {
+ sizeof(digest)) {
/* We have a well formed version 2 descriptor ID. Keep the decoded value
* of the id. */
desc_id = digest;