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 pointer dereference, noticed by KUBSAN.
details: https://anonhg.NetBSD.org/src/rev/e4448036df62
branches: trunk
changeset: 958138:e4448036df62
user: nia <nia%NetBSD.org@localhost>
date: Sat Dec 26 10:43:39 2020 +0000
description:
Avoid NULL pointer dereference, noticed by KUBSAN.
"Looks fine" roy@
diffstat:
sys/netinet6/nd6.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 8516d6b39746 -r e4448036df62 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Sat Dec 26 08:58:03 2020 +0000
+++ b/sys/netinet6/nd6.c Sat Dec 26 10:43:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.274 2020/09/15 10:05:36 roy Exp $ */
+/* $NetBSD: nd6.c,v 1.275 2020/12/26 10:43:39 nia Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.274 2020/09/15 10:05:36 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.275 2020/12/26 10:43:39 nia Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -384,8 +384,8 @@
const union l3addr *hsrc)
{
- nd6_ns_output(ifp, &daddr->addr6, &taddr->addr6,
- &hsrc->addr6, NULL);
+ nd6_ns_output(ifp, daddr != NULL ? &daddr->addr6 : NULL,
+ &taddr->addr6, &hsrc->addr6, NULL);
}
static bool
Home |
Main Index |
Thread Index |
Old Index