summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-10-15 10:54:15 +0200
committerSteven Barth <steven@midlink.org>2013-10-15 10:54:15 +0200
commit7117854698ba7c77da5823fc673f44e6db0fee5f (patch)
treef9e59dc196eac4441ff031c873a1e84bbe9a771b /src/odhcpd.c
parentb9ffc26a2d12b9769d1c519d8c851b7c9301e82c (diff)
Fix some more memory issues
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 6070bfb..acedaec 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -131,6 +131,7 @@ int odhcpd_get_interface_mtu(const char *ifname)
int odhcpd_get_mac(const struct interface *iface, uint8_t mac[6])
{
struct ifreq ifr;
+ memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, iface->ifname, sizeof(ifr.ifr_name));
if (ioctl(ioctl_sock, SIOCGIFHWADDR, &ifr) < 0)
return -1;