[tor-commits] [tor/master] Fix a coverity uninitialized-pointer warning in policy tests.
nickm at torproject.org
nickm at torproject.org
Fri Dec 18 15:36:04 UTC 2015
commit 498897e33d1e32054f0c5cd23f8f0850785733db
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Dec 18 10:29:27 2015 -0500
Fix a coverity uninitialized-pointer warning in policy tests.
This is CID 1340255
---
src/test/test_policy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index 4f5565e..794978f 100644
--- a/src/test/test_policy.c
+++ b/src/test/test_policy.c
@@ -1021,6 +1021,8 @@ test_policies_getinfo_helper_policies(void *arg)
const char *errmsg = NULL;
routerinfo_t mock_my_routerinfo;
+ memset(&mock_my_routerinfo, 0, sizeof(mock_my_routerinfo));
+
rv = getinfo_helper_policies(NULL, "exit-policy/default", &answer, &errmsg);
tt_assert(rv == 0);
tt_assert(answer != NULL);
More information about the tor-commits
mailing list