aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/control_cmd.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-06-16 14:38:08 -0700
committerDavid Goulet <dgoulet@torproject.org>2020-06-24 15:47:57 -0400
commitc8fd7b7040b9c036438afc493352fbccb4c1d357 (patch)
treeb6d45183b142915722ea173bd9395648e9cfed79 /src/feature/control/control_cmd.c
parent285dbeefa1b7e827df8dfa4a76a410330345c443 (diff)
downloadtor-c8fd7b7040b9c036438afc493352fbccb4c1d357.tar.gz
tor-c8fd7b7040b9c036438afc493352fbccb4c1d357.zip
Make HSFETCH take the decoded length into account, not the base32 one
Diffstat (limited to 'src/feature/control/control_cmd.c')
-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 d9a38011de..eb14f101e7 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;