tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit a11a9bb3a0ebdba5c4a283012cc35d5077ee796c
parent 1d9de2948b7e40a0044dd1651b0c8cb407a8a2fd
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon, 12 Jul 2021 14:59:29 -0400

test_hs_ob: initialize pointers to NULL

This is an attempt to fix CID 1486280, where coverity warns us that,
if the tests failed, we might free() an uninitialized pointer.

Diffstat:
Msrc/test/test_hs_ob.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/test/test_hs_ob.c b/src/test/test_hs_ob.c @@ -174,6 +174,7 @@ test_get_subcredentials(void *arg) hs_subcredential_t *subcreds = NULL; (void) arg; + memset(&config, 0, sizeof(config)); MOCK(networkstatus_get_live_consensus, mock_networkstatus_get_live_consensus);