[tor-commits] [tor/master] Fix a memory-poisoning memset in tortls.c

nickm at torproject.org nickm at torproject.org
Fri Oct 28 22:03:09 UTC 2011


commit 7a8960cf1b34d27db0ffe0929c1810800f319c86
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Oct 28 16:37:42 2011 -0400

    Fix a memory-poisoning memset in tortls.c
---
 src/common/tortls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/common/tortls.c b/src/common/tortls.c
index 7aaa4e0..8cf396c 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -694,7 +694,7 @@ tor_cert_free(tor_cert_t *cert)
   if (cert->cert)
     X509_free(cert->cert);
   tor_free(cert->encoded);
-  memset(cert, 0x03, sizeof(cert));
+  memset(cert, 0x03, sizeof(*cert));
   tor_free(cert);
 }
 





More information about the tor-commits mailing list