[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/main] fix an already-existing bug in the unit tests
commit 5ee85c1fac9adbc09e0930166841c192129b2c28
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date: Fri Oct 29 15:24:43 2021 -0400
fix an already-existing bug in the unit tests
where the or_conn for testing the failure cache would be initialized
with random stack data, so e.g. its potentially_used_for_bootstrapping
field would start out at some random value.
---
src/test/test_connection.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index 87940f71e6..fbf9d6a5ab 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -826,6 +826,7 @@ test_failed_orconn_tracker(void *arg)
/* Prepare the OR connection that will be used in this test */
or_connection_t or_conn;
+ memset(&or_conn, 0, sizeof(or_conn));
tt_int_op(AF_INET,OP_EQ, tor_addr_parse(&or_conn.canonical_orport.addr,
"18.0.0.1"));
tt_int_op(AF_INET,OP_EQ, tor_addr_parse(&or_conn.base_.addr, "18.0.0.1"));
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits