Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Add more guards against NULL deref, since KUBSA...



details:   https://anonhg.NetBSD.org/src/rev/d34484219242
branches:  trunk
changeset: 948674:d34484219242
user:      nia <nia%NetBSD.org@localhost>
date:      Mon Dec 28 20:19:50 2020 +0000

description:
Add more guards against NULL deref, since KUBSAN still complains.

diffstat:

 sys/netinet6/nd6.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 8c6d002463d7 -r d34484219242 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Mon Dec 28 20:01:46 2020 +0000
+++ b/sys/netinet6/nd6.c        Mon Dec 28 20:19:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.275 2020/12/26 10:43:39 nia Exp $    */
+/*     $NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 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.275 2020/12/26 10:43:39 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 nia Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -384,8 +384,10 @@
     const union l3addr *hsrc)
 {
 
-       nd6_ns_output(ifp, daddr != NULL ? &daddr->addr6 : NULL,
-           &taddr->addr6, &hsrc->addr6, NULL);
+       nd6_ns_output(ifp,
+           daddr != NULL ? &daddr->addr6 : NULL,
+           taddr != NULL ? &taddr->addr6 : NULL,
+           hsrc != NULL ? &hsrc->addr6 : NULL, NULL);
 }
 
 static bool



Home | Main Index | Thread Index | Old Index