pcap: do bounds checking in net_pcap_prepare when processing the list of host interfaces
This commit is contained in:
@@ -354,6 +354,9 @@ net_pcap_prepare(netdev_t *list)
|
||||
}
|
||||
|
||||
for (dev=devlist; dev!=NULL; dev=dev->next) {
|
||||
if (i >= (NET_HOST_INTF_MAX - 1))
|
||||
break;
|
||||
|
||||
/**
|
||||
* we initialize the strings to NULL first for strncpy
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,7 @@ int net_card_current = 0;
|
||||
|
||||
/* Global variables. */
|
||||
int network_ndev;
|
||||
netdev_t network_devs[32];
|
||||
netdev_t network_devs[NET_HOST_INTF_MAX];
|
||||
|
||||
|
||||
/* Local variables. */
|
||||
|
||||
Reference in New Issue
Block a user