Home GnuPG
Diffusion GnuPG 0c05b08e8b5c

libdns: Clear struct sockaddr_storage by zero.

Description

libdns: Clear struct sockaddr_storage by zero.

* dirmngr/dns.c (dns_resconf_pton): Clear SS.
(dns_resconf_setiface): Clear ->IFACE.
(dns_hints_root, send_query): Clear SS.

Cherry pick from master commit:

1c0b6681e4f322b88ac35d1f21c03d3cfc35fc23

POSIX requires clear the structure of struct sockaddr_in6. On macOS,
in some case like bind, it is better to clear even for struct
sockaddr_in.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jun 15 2018, 3:38 AM
Parents
rG20c289606f89: libdns: Sync to upstream.
Branches
Unknown
Tags
Unknown