From 2a39b6e2e81f8b445e2e7c8d220e200cd88446eb Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 28 Nov 2017 16:51:28 +0100 Subject: [PATCH] Handle the uninitialized memory error the brutal way Because clang (or valgrind with clang) is just wrong here --- src/request-internal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/request-internal.c b/src/request-internal.c index c9f27db0..b78c19ab 100644 --- a/src/request-internal.c +++ b/src/request-internal.c @@ -866,6 +866,7 @@ _getdns_dns_req_new(getdns_context *context, getdns_eventloop *loop, if (! (region = GETDNS_XMALLOC(context->mf, uint8_t, dnsreq_base_sz + (a_aaaa_query ? 2 : 1) * netreq_sz))) return NULL; + (void) memset(region, 0, sizeof(getdns_dns_req)); result = (getdns_dns_req *)region; result->netreqs[0] = (getdns_network_req *)(region + dnsreq_base_sz);