소스 검색

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);