Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2001 22:01:06 +0200 (CEST)
From:      Christian Carstensen <cc@devcon.net>
To:        <current@freebsd.org>
Subject:   and another one...
Message-ID:  <Pine.BSF.4.33.0109012154480.602-100000@albert.gate5.de>

next in thread | raw e-mail | index | archive | help


hi,


in net/bpf.c, bpfdetach(), stuct bpf_if *bp is used in a for loop, that,
if not terminated by break before, leaves bp == NULL.
evaluating (bp->bif_ifp == NULL) two lines later will cause a NULL pointer
dereference, resulting in trap 12.
please apply the attached patch.


best,
  christian

-- 
"Sorry, no defects found. Please try a different search"
                          [http://www.cisco.com/support/bugtools/bugtool.shtml]

----------------------------

Index: bpf.c
===================================================================
RCS file: /usr/cvs/src/sys/net/bpf.c,v
retrieving revision 1.80
diff -r1.80 bpf.c
1267c1267
< 	if (bp->bif_ifp == NULL) {
---
> 	if (bp == NULL || bp->bif_ifp == NULL) {


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0109012154480.602-100000>