[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix a coverity uninitialized-pointer warning in policy tests.



commit 498897e33d1e32054f0c5cd23f8f0850785733db
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits