]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory-poisoning memset in tortls.c
authorNick Mathewson <nickm@torproject.org>
Fri, 28 Oct 2011 20:37:42 +0000 (16:37 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 28 Oct 2011 20:37:42 +0000 (16:37 -0400)
src/common/tortls.c

index 7aaa4e08941ce4e4cefc98a8ef8be732d69110a1..8cf396cdac82b03750ddf0ce0badd5ac3974905e 100644 (file)
@@ -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);
 }