From: Andrea Shepard Date: Sat, 16 Jun 2012 03:54:45 +0000 (-0700) Subject: Clean keys on stack in rend_service_rendezvous_has_opened() X-Git-Tag: tor-0.2.4.1-alpha~118^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=276f95182c864a4cb9457bf56d842ef297e2cd2b;p=thirdparty%2Ftor.git Clean keys on stack in rend_service_rendezvous_has_opened() --- diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 50950d1ac2..acc3cea223 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1847,9 +1847,16 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit) /* Change the circuit purpose. */ circuit_change_purpose(TO_CIRCUIT(circuit), CIRCUIT_PURPOSE_S_REND_JOINED); - return; + goto done; + err: circuit_mark_for_close(TO_CIRCUIT(circuit), reason); + done: + memset(buf, 0, sizeof(buf)); + memset(serviceid, 0, sizeof(serviceid)); + memset(hexcookie, 0, sizeof(hexcookie)); + + return; } /*