diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-04-23 02:22:08 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-04-23 02:22:08 +0200 |
commit | 646f9feb261d7e45b75dc2fcf65b9e719dd5f829 (patch) | |
tree | 46980536730f767da0046b35f0f364bdcbab7317 /test/bench_httpclient.c | |
parent | 744c7456c7f31529d4b9eeb86f2b6551a0a38346 (diff) | |
download | libevent-646f9feb261d7e45b75dc2fcf65b9e719dd5f829.tar.gz |
Zero a struct sockaddr_in before using it
Found by Dave Heart
Diffstat (limited to 'test/bench_httpclient.c')
-rw-r--r-- | test/bench_httpclient.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/bench_httpclient.c b/test/bench_httpclient.c index f0888e6c..87103cc8 100644 --- a/test/bench_httpclient.c +++ b/test/bench_httpclient.c @@ -36,6 +36,7 @@ # endif #endif #include <stdlib.h> +#include <string.h> #include <errno.h> #include "event2/event.h" @@ -130,6 +131,8 @@ launch_request(void) struct request_info *ri; + memset(&sin, 0, sizeof(sin)); + ++total_n_launched; sin.sin_family = AF_INET; |