Otherwise, it's filled with stack garbage, which might result in
getaddrinfo returning -1 for invalid hints. Since this influences the
delivery of mail or not, this remotely reveals something having to do
with bytes off the stack. Bad news bears.

Signed-off-by: Jason A. Donenfeld <ja...@zx2c4.com>
---
 smtpd/filters/filter_dnsbl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/smtpd/filters/filter_dnsbl.c b/smtpd/filters/filter_dnsbl.c
index 7e6ce06..0e1ec6b 100644
--- a/smtpd/filters/filter_dnsbl.c
+++ b/smtpd/filters/filter_dnsbl.c
@@ -83,6 +83,7 @@ dnsbl_on_connect(uint64_t id, struct filter_connect *conn)
        }
        *q = id;
 
+       memset(&hints, 0, sizeof(hints));
        hints.ai_family = PF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
        aq = getaddrinfo_async(buf, NULL, &hints, NULL);
-- 
1.9.3


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to