pcap: do bounds checking in net_pcap_prepare when processing the list of host interfaces

This commit is contained in:
Adrien Moulin
2022-08-25 00:43:48 +02:00
parent d1f4958bb7
commit 8ec983b1ef
3 changed files with 6 additions and 2 deletions

View File

@@ -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
*/