Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2]: src/sys/arch/sun3/dev Pull up revision 1.42 (requested by tsu...
details: https://anonhg.NetBSD.org/src/rev/debecdaf7694
branches: netbsd-2
changeset: 563693:debecdaf7694
user: riz <riz%NetBSD.org@localhost>
date: Tue May 31 21:26:39 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 31ce6d023e84 -r debecdaf7694 sys/arch/sun3/dev/if_ie.c
--- a/sys/arch/sun3/dev/if_ie.c Tue May 31 21:13:11 2005 +0000
+++ b/sys/arch/sun3/dev/if_ie.c Tue May 31 21:26:39 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.39.4.1 2005/01/24 21:42:47 he Exp $ */
+/* $NetBSD: if_ie.c,v 1.39.4.2 2005/05/31 21:26:39 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.4.1 2005/01/24 21:42:47 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.39.4.2 2005/05/31 21:26:39 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