]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Clean keys on stack in rend_service_rendezvous_has_opened()
authorAndrea Shepard <andrea@persephoneslair.org>
Sat, 16 Jun 2012 03:54:45 +0000 (20:54 -0700)
committerAndrea Shepard <andrea@persephoneslair.org>
Sat, 16 Jun 2012 03:54:45 +0000 (20:54 -0700)
src/or/rendservice.c

index 50950d1ac2918521ac175b25ca1941dd6356137f..acc3cea2230f3c80a23bef4ba7ef31862b03cf51 100644 (file)
@@ -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;
 }
 
 /*