Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/arch/sun3/dev Pull up revision 1.42 (requested by t...



details:   https://anonhg.NetBSD.org/src/rev/919b7a821481
branches:  netbsd-2-0
changeset: 564781:919b7a821481
user:      riz <riz%NetBSD.org@localhost>
date:      Tue May 31 21:52:34 2005 +0000

description:
Pull up revision 1.42 (requested by tsutsui in ticket #1874):
Avoid NULL pointer dereference in case of #if NBPFILTER == 0.
Closes PR port-sun3/21699.

diffstat:

 sys/arch/sun3/dev/if_ie.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (43 lines):

diff -r f053206b8cc8 -r 919b7a821481 sys/arch/sun3/dev/if_ie.c
--- a/sys/arch/sun3/dev/if_ie.c Tue May 24 19:58:31 2005 +0000
+++ b/sys/arch/sun3/dev/if_ie.c Tue May 31 21:52:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie.c,v 1.39 2003/07/15 03:36:14 lukem Exp $ */
+/*     $NetBSD: if_ie.c,v 1.39.2.1 2005/05/31 21:52:34 riz Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@@ -98,7 +98,7 @@
 */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.39 2003/07/15 03:36:14 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.39.2.1 2005/05/31 21:52:34 riz Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -704,14 +704,11 @@
        struct ether_header *eh;
        int *to_bpf;
 {
+#if NBPFILTER > 0
        struct ifnet *ifp;
 
        ifp = &sc->sc_if;
-
-#if NBPFILTER > 0
        *to_bpf = (ifp->if_bpf != 0);
-#else
-       *to_bpf = 0;
 #endif
 
        /*
@@ -987,7 +984,7 @@
 #if NBPFILTER > 0
                m = ieget(sc, &bpf_gets_it);
 #else
-               m = ieget(sc, 0);
+               m = ieget(sc, NULL);
 #endif
                ie_drop_packet_buffer(sc);
        }



Home | Main Index | Thread Index | Old Index