[tor-commits] [obfsproxy/master] Zero the whole key in crypt_free()

nickm at torproject.org nickm at torproject.org
Tue Feb 14 23:34:29 UTC 2012


commit ceedb351fb16d5f3791713bf55ecc8725697130b
Author: Sebastian Hahn <sebastian at torproject.org>
Date:   Wed Feb 15 00:12:03 2012 +0100

    Zero the whole key in crypt_free()
---
 src/crypt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/crypt.c b/src/crypt.c
index e70ec29..50a1c30 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -178,7 +178,7 @@ stream_crypt(crypt_t *key, uchar *buf, size_t len)
 void
 crypt_free(crypt_t *key)
 {
-  memset(key, 0, sizeof(key));
+  memset(key, 0, sizeof(crypt_t));
   free(key);
 }
 





More information about the tor-commits mailing list