mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-20 02:53:03 -05:00
Zero struct ifreq data before use in l2_packet_init()
[Bug 300]
This commit is contained in:
parent
90ac1f9fc9
commit
b7d3a95afc
@ -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]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user