summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-04-19 17:08:09 -0400
committerNick Mathewson <nickm@torproject.org>2012-04-19 17:08:09 -0400
commitbd7724a57eeb756232f5be222c643ccb8b364966 (patch)
treedb7e3f7743071e852205a215225ae7ff0b687608
parenta0d1e806e036969e02eeb4966e0d618f32643ce0 (diff)
parentf6afd4efa6c24fab8ace710fc0eac4c8811b93dd (diff)
downloadtor-bd7724a57eeb756232f5be222c643ccb8b364966.tar.gz
tor-bd7724a57eeb756232f5be222c643ccb8b364966.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r--changes/bug56474
-rw-r--r--src/or/routerparse.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/changes/bug5647 b/changes/bug5647
new file mode 100644
index 0000000000..92f41c8559
--- /dev/null
+++ b/changes/bug5647
@@ -0,0 +1,4 @@
+ o Major bugfixes:
+ - Avoid logging uninitialized data when unable to decode a hidden
+ service descriptor cookie. Fixes bug 5647; bugfix on 0.2.1.5-alpha.
+
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 33c68d74b4..99b4eb0732 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -5107,7 +5107,6 @@ rend_parse_client_keys(strmap_t *parsed_clients, const char *ckstr)
while (!strcmpstart(current_entry, "client-name ")) {
rend_authorized_client_t *parsed_entry;
size_t len;
- char descriptor_cookie_base64[REND_DESC_COOKIE_LEN_BASE64+2+1];
char descriptor_cookie_tmp[REND_DESC_COOKIE_LEN+2];
/* Determine end of string. */
const char *eos = strstr(current_entry, "\nclient-name ");
@@ -5176,7 +5175,7 @@ rend_parse_client_keys(strmap_t *parsed_clients, const char *ckstr)
tok->args[0], REND_DESC_COOKIE_LEN_BASE64+2+1)
!= REND_DESC_COOKIE_LEN)) {
log_warn(LD_REND, "Descriptor cookie contains illegal characters: "
- "%s", descriptor_cookie_base64);
+ "%s", escaped(tok->args[0]));
goto err;
}
memcpy(parsed_entry->descriptor_cookie, descriptor_cookie_tmp,