arp(8): avoid segfaulting due to out-of-bounds memory access
Fix obvious mistake that sometimes results in reading memory past end of an array. PR: 240825 MFC after: 1 week
This commit is contained in:
parent
f2792e5e55
commit
693d381624
@ -627,8 +627,7 @@ print_entry(struct sockaddr_dl *sdl,
|
||||
} else
|
||||
xo_emit("{d:/(incomplete)}{en:incomplete/true}");
|
||||
|
||||
for (p = ifnameindex; p && ifnameindex->if_index &&
|
||||
ifnameindex->if_name; p++) {
|
||||
for (p = ifnameindex; p && p->if_index && p->if_name; p++) {
|
||||
if (p->if_index == sdl->sdl_index) {
|
||||
xo_emit(" on {:interface/%s}", p->if_name);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user