diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-04-20 11:28:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-04-20 11:28:57 -0400 |
commit | 5630b61f5c902704f4a4438c321503da2981cdac (patch) | |
tree | 8d227ba43e4c209844f212915b20aaed7fa7cb64 /src | |
parent | 774c3084310c4049246211f98ac90e380b7f3fb9 (diff) | |
parent | f2384d5e2c25469038caa84e0dedaa5e2efca29c (diff) | |
download | tor-5630b61f5c902704f4a4438c321503da2981cdac.tar tor-5630b61f5c902704f4a4438c321503da2981cdac.tar.gz |
Merge remote-tracking branch 'public/bug5647_cleanup'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerparse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 99b4eb073..7cc8b965e 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -5171,9 +5171,9 @@ rend_parse_client_keys(strmap_t *parsed_clients, const char *ckstr) /* The size of descriptor_cookie_tmp needs to be REND_DESC_COOKIE_LEN+2, * because a base64 encoding of length 24 does not fit into 16 bytes in all * cases. */ - if ((base64_decode(descriptor_cookie_tmp, REND_DESC_COOKIE_LEN+2, - tok->args[0], REND_DESC_COOKIE_LEN_BASE64+2+1) - != REND_DESC_COOKIE_LEN)) { + if (base64_decode(descriptor_cookie_tmp, sizeof(descriptor_cookie_tmp), + tok->args[0], strlen(tok->args[0])) + != REND_DESC_COOKIE_LEN) { log_warn(LD_REND, "Descriptor cookie contains illegal characters: " "%s", escaped(tok->args[0])); goto err; |