From: Manu Nicolas Date: Tue, 1 Sep 2026 10:44:45 +0000 (+0000) Subject: CLEANUP: resolvers: stop clearing the DNS response buffer X-Git-Tag: v3.5-dev6~24 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=259465498fe59c3c14125e5a956ab4d5accee2f4;p=haproxy.git CLEANUP: resolvers: stop clearing the DNS response buffer resolv_process_responses() clears the whole response buffer before each receive. The receive operation supplies the message length and all parser accesses are bounded by the corresponding end pointer, so no byte beyond the received message is observed. Remove the unnecessary buffer clear. --- diff --git a/src/resolvers.c b/src/resolvers.c index 92c4567a0..0dc4787bf 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -2341,7 +2341,6 @@ static int resolv_process_responses(struct dns_nameserver *ns) /* process all pending input messages */ while (1) { /* read message received */ - memset(buf, '\0', resolvers->accepted_payload_size + 1); if ((buflen = dns_recv_nameserver(ns, (void *)buf, sizeof(buf))) <= 0) { break; }