aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Stefani <lstefani@fortresstech.com>2009-03-13 17:04:33 +0200
committerJouni Malinen <j@w1.fi>2009-03-13 17:04:33 +0200
commitb7d3a95afc001bdf63a35ec494fbd71629196b04 (patch)
tree87597cad3940e69bf608d48094712d45681e43c5
parent90ac1f9fc9411453d83900c7d1d2e6abfdb65ac3 (diff)
downloadexternal_wpa_supplicant_8_ti-b7d3a95afc001bdf63a35ec494fbd71629196b04.zip
external_wpa_supplicant_8_ti-b7d3a95afc001bdf63a35ec494fbd71629196b04.tar.gz
external_wpa_supplicant_8_ti-b7d3a95afc001bdf63a35ec494fbd71629196b04.tar.bz2
Zero struct ifreq data before use in l2_packet_init()
[Bug 300]
-rw-r--r--src/l2_packet/l2_packet_linux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/l2_packet/l2_packet_linux.c b/src/l2_packet/l2_packet_linux.c
index 9def7ff..fb35770 100644
--- a/src/l2_packet/l2_packet_linux.c
+++ b/src/l2_packet/l2_packet_linux.c
@@ -115,6 +115,7 @@ struct l2_packet_data * l2_packet_init(
os_free(l2);
return NULL;
}
+ os_memset(&ifr, 0, sizeof(ifr));
os_strlcpy(ifr.ifr_name, l2->ifname, sizeof(ifr.ifr_name));
if (ioctl(l2->fd, SIOCGIFINDEX, &ifr) < 0) {
perror("ioctl[SIOCGIFINDEX]");