aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2021-10-29 15:24:43 -0400
committerRoger Dingledine <arma@torproject.org>2021-11-08 05:37:02 -0500
commit5ee85c1fac9adbc09e0930166841c192129b2c28 (patch)
tree3b0117f4efdade44a5e12623ba6e21a50027f69a /src/test
parent5ad126a51bdfaeecc81b1cb6517abd2d5e039fad (diff)
downloadtor-5ee85c1fac9adbc09e0930166841c192129b2c28.tar.gz
tor-5ee85c1fac9adbc09e0930166841c192129b2c28.zip
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.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_connection.c1
1 files changed, 1 insertions, 0 deletions
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"));