summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-13 08:04:57 +0000
committerngie <ngie@FreeBSD.org>2016-05-13 08:04:57 +0000
commit6358713d891d38731f18bb70fba3d5e4666c19e4 (patch)
tree4026ccd4554e43a7788cf04a4bba429e0c118f9e /sys/net
parent18be13c68905d63cedad37f6e4d22b3eb386fbc7 (diff)
downloadFreeBSD-src-6358713d891d38731f18bb70fba3d5e4666c19e4.zip
FreeBSD-src-6358713d891d38731f18bb70fba3d5e4666c19e4.tar.gz
MFC r298328:
r298328 (by cem): 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. CID: 1352743
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index c40e29f..63426e7 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2643,7 +2643,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;
}
OpenPOWER on IntegriCloud