]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix uninitialized memory reads from test_geoip_with_pt. Found with valgrind
authorNick Mathewson <nickm@torproject.org>
Sat, 26 Apr 2014 04:12:16 +0000 (00:12 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 26 Apr 2014 04:12:16 +0000 (00:12 -0400)
src/test/test.c

index f7e26a6f3c1149125a3986a3b01a8354c7e3151b..c96b3965996f4f676909d759f9589e535e3323cc 100644 (file)
@@ -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);