From 555334670aa13135050c95128c66d6149cc02b0c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 25 Jul 2012 15:59:50 -0400 Subject: [PATCH 1/2] Remove deadcode in http regression tests. Found by coverity. --- test/regress_http.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/regress_http.c b/test/regress_http.c index aea318f4..f30b2e36 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -892,7 +892,6 @@ _http_connection_test(struct basic_test_data *data, int persistent) /* We give ownership of the request to the connection */ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { tt_abort_msg("Couldn't make request"); - exit(1); } event_base_dispatch(data->base); @@ -1001,7 +1000,6 @@ http_connection_async_test(void *arg) /* We give ownership of the request to the connection */ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { tt_abort_msg("Couldn't make request"); - exit(1); } event_base_dispatch(data->base); @@ -1844,7 +1842,6 @@ _http_close_detection(struct basic_test_data *data, int with_delay) if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, with_delay ? "/largedelay" : "/test") == -1) { tt_abort_msg("couldn't make request"); - exit(1); } event_base_dispatch(data->base); From 2259777cc8d90740974323787763255505cacf6a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 25 Jul 2012 16:05:36 -0400 Subject: [PATCH 2/2] Fix possible uninitialized read in dns regression tests. Found by coverity. --- test/regress_dns.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/regress_dns.c b/test/regress_dns.c index a566469b..b34fb96c 100644 --- a/test/regress_dns.c +++ b/test/regress_dns.c @@ -1216,6 +1216,7 @@ test_getaddrinfo_async(void *arg) evdns_base_load_hosts(dns_base, NULL); memset(a_out, 0, sizeof(a_out)); + memset(&local_outcome, 0, sizeof(local_outcome)); n_gai_results_pending = 10000; /* don't think about exiting yet. */