Преглед на файлове

fix uninitialized memory reads from test_geoip_with_pt. Found with valgrind

Nick Mathewson преди 10 години
родител
ревизия
3fa296ce28
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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);