aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@persephoneslair.org>2012-06-15 21:47:06 -0700
committerAndrea Shepard <andrea@persephoneslair.org>2012-06-15 21:47:06 -0700
commitb5280efc179bd5ed5607246a3b4460fb7f7c0068 (patch)
tree02d8138b2424da1d422e319df11e0e7c0e428720 /src
parent7f24b9b8c3d29143deb65dae34d2c35b940319e3 (diff)
downloadtor-b5280efc179bd5ed5607246a3b4460fb7f7c0068.tar
tor-b5280efc179bd5ed5607246a3b4460fb7f7c0068.tar.gz
Clean up keys on stack in rend_parse_service_authorization()
Diffstat (limited to 'src')
-rw-r--r--src/or/rendclient.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 7208fb813..c74be520c 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -1198,11 +1198,11 @@ rend_parse_service_authorization(const or_options_t *options,
strmap_t *parsed = strmap_new();
smartlist_t *sl = smartlist_new();
rend_service_authorization_t *auth = NULL;
+ char descriptor_cookie_tmp[REND_DESC_COOKIE_LEN+2];
+ char descriptor_cookie_base64ext[REND_DESC_COOKIE_LEN_BASE64+2+1];
for (line = options->HidServAuth; line; line = line->next) {
char *onion_address, *descriptor_cookie;
- char descriptor_cookie_tmp[REND_DESC_COOKIE_LEN+2];
- char descriptor_cookie_base64ext[REND_DESC_COOKIE_LEN_BASE64+2+1];
int auth_type_val = 0;
auth = NULL;
SMARTLIST_FOREACH(sl, char *, c, tor_free(c););
@@ -1279,6 +1279,8 @@ rend_parse_service_authorization(const or_options_t *options,
} else {
strmap_free(parsed, rend_service_authorization_strmap_item_free);
}
+ memset(descriptor_cookie_tmp, 0, sizeof(descriptor_cookie_tmp));
+ memset(descriptor_cookie_base64ext, 0, sizeof(descriptor_cookie_base64ext));
return res;
}