[tor-commits] [tor/release-0.4.2] Wipe the entire hashent structure, not just the first sizeof(void*)

nickm at torproject.org nickm at torproject.org
Mon Jun 29 17:57:53 UTC 2020


commit c1649ab01522f6258fc2555869cbf3abb7535515
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Feb 14 08:15:37 2020 -0500

    Wipe the entire hashent structure, not just the first sizeof(void*)
---
 src/core/or/circuitmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/or/circuitmux.c b/src/core/or/circuitmux.c
index 72f6ba662..4b19a12e3 100644
--- a/src/core/or/circuitmux.c
+++ b/src/core/or/circuitmux.c
@@ -978,7 +978,7 @@ circuitmux_detach_circuit,(circuitmux_t *cmux, circuit_t *circ))
     /* Wipe and free the hash entry */
     // This isn't sensitive, but we want to be sure to know if we're accessing
     // this accidentally.
-    memwipe(hashent, 0xef, sizeof(hashent));
+    memwipe(hashent, 0xef, sizeof(*hashent));
     tor_free(hashent);
   }
 }





More information about the tor-commits mailing list