diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-12-20 08:36:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-20 08:36:25 -0500 |
commit | a517daa56f5848d25ba79617a1a7b82ed2b0a7c0 (patch) | |
tree | 88bddb2445449578fefd399ed73a46435113bf2c /src/feature/control/control.c | |
parent | 973a5db80851838e4516de40afe028bc10c425f0 (diff) | |
download | tor-a517daa56f5848d25ba79617a1a7b82ed2b0a7c0.tar.gz tor-a517daa56f5848d25ba79617a1a7b82ed2b0a7c0.zip |
base32_decode(): Return number of bytes written on success.
This makes it consistent with base64_decode().
Closes ticket 28913.
Diffstat (limited to 'src/feature/control/control.c')
-rw-r--r-- | src/feature/control/control.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/control/control.c b/src/feature/control/control.c index 7fae3b7a1b..1e3db6337e 100644 --- a/src/feature/control/control.c +++ b/src/feature/control/control.c @@ -4428,7 +4428,8 @@ handle_control_hsfetch(control_connection_t *conn, uint32_t len, } else if (strcmpstart(arg1, v2_str) == 0 && rend_valid_descriptor_id(arg1 + v2_str_len) && base32_decode(digest, sizeof(digest), arg1 + v2_str_len, - REND_DESC_ID_V2_LEN_BASE32) == 0) { + REND_DESC_ID_V2_LEN_BASE32) == + REND_DESC_ID_V2_LEN_BASE32) { /* We have a well formed version 2 descriptor ID. Keep the decoded value * of the id. */ desc_id = digest; |