mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
The interface name field was only partially initialized.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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.
|
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
|
||||||
@@ -226,6 +226,7 @@ internal_current(isc_interfaceiter_t *iter) {
|
|||||||
iter->current.af = family;
|
iter->current.af = family;
|
||||||
|
|
||||||
INSIST(sizeof(lifreq.lifr_name) <= sizeof(iter->current.name));
|
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));
|
memcpy(iter->current.name, lifreq.lifr_name, sizeof(lifreq.lifr_name));
|
||||||
|
|
||||||
get_addr(family, &iter->current.address,
|
get_addr(family, &iter->current.address,
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* 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.
|
* 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)
|
if (namelen > sizeof(iter->current.name) - 1)
|
||||||
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);
|
memcpy(iter->current.name, sdl->sdl_data, namelen);
|
||||||
|
|
||||||
iter->current.flags = 0;
|
iter->current.flags = 0;
|
||||||
|
Reference in New Issue
Block a user