bpf_getdltlist: Don't overrun 'lst'
'lst' is allocated with 'n1' members. 'n' indexes 'lst'. So 'n == n1' is an invalid 'lst' index. This is a follow-up to r296009. Reported by: Coverity CID: 1352743 Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
6b1c46441c
commit
5412ec6e3f
@ -2739,7 +2739,7 @@ again:
|
||||
LIST_FOREACH(bp, &bpf_iflist, bif_next) {
|
||||
if (bp->bif_ifp != ifp)
|
||||
continue;
|
||||
if (n > n1) {
|
||||
if (n >= n1) {
|
||||
free(lst, M_TEMP);
|
||||
goto again;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user