Browse Source

fix uninitialized memory reads from test_geoip_with_pt. Found with valgrind

Nick Mathewson 10 years ago
parent
commit
3fa296ce28
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/test/test.c

+ 2 - 0
src/test/test.c

@@ -1018,6 +1018,8 @@ test_geoip_with_pt(void)
   get_options_mutable()->BridgeRelay = 1;
   get_options_mutable()->BridgeRecordUsageByCountry = 1;
 
+  memset(&in6, 0, sizeof(in6));
+
   /* No clients seen yet. */
   s = geoip_get_transport_history();
   tor_assert(!s);