[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 7a8960cf1b34d27db0ffe0929c1810800f319c86
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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);
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits