Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 avoid NULL dereference in error case
details: https://anonhg.NetBSD.org/src/rev/72c2d2d0304c
branches: trunk
changeset: 757680:72c2d2d0304c
user: drochner <drochner%NetBSD.org@localhost>
date: Sun Sep 12 16:04:57 2010 +0000
description:
avoid NULL dereference in error case
diffstat:
sys/netinet6/icmp6.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 332ee317a333 -r 72c2d2d0304c sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Sun Sep 12 16:03:39 2010 +0000
+++ b/sys/netinet6/icmp6.c Sun Sep 12 16:04:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.155 2009/10/18 22:57:05 christos Exp $ */
+/* $NetBSD: icmp6.c,v 1.156 2010/09/12 16:04:57 drochner Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.155 2009/10/18 22:57:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.156 2010/09/12 16:04:57 drochner Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -478,7 +478,9 @@
i = off + sizeof(*icmp6);
if ((m->m_len < i || M_READONLY(m)) && (m = m_pullup(m, i)) == 0) {
ICMP6_STATINC(ICMP6_STAT_TOOSHORT);
+#if 0 /* m is 0 here */
icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_error);
+#endif
goto freeit;
}
ip6 = mtod(m, struct ip6_hdr *);
Home |
Main Index |
Thread Index |
Old Index