2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

The interface name field was only partially initialized.

This commit is contained in:
Brian Wellington
2001-02-06 01:20:46 +00:00
parent 770d3b36da
commit 2305225a1c
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ifiter_ioctl.c,v 1.16 2001/01/09 21:58:19 bwelling Exp $ */
/* $Id: ifiter_ioctl.c,v 1.17 2001/02/06 01:20:45 bwelling Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -226,6 +226,7 @@ internal_current(isc_interfaceiter_t *iter) {
iter->current.af = family;
INSIST(sizeof(lifreq.lifr_name) <= sizeof(iter->current.name));
memset(iter->current.name, 0, sizeof(iter->current.name));
memcpy(iter->current.name, lifreq.lifr_name, sizeof(lifreq.lifr_name));
get_addr(family, &iter->current.address,

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ifiter_sysctl.c,v 1.12 2001/01/09 21:58:20 bwelling Exp $ */
/* $Id: ifiter_sysctl.c,v 1.13 2001/02/06 01:20:46 bwelling Exp $ */
/*
* Obtain the list of network interfaces using sysctl.
@@ -165,6 +165,7 @@ internal_current(isc_interfaceiter_t *iter) {
if (namelen > sizeof(iter->current.name) - 1)
namelen = sizeof(iter->current.name) - 1;
memset(iter->current.name, 0, sizeof(iter->current.name));
memcpy(iter->current.name, sdl->sdl_data, namelen);
iter->current.flags = 0;