Source-Changes-HG archive

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

[src/trunk]: src/sys/net fix CID 1396600: Null pointer dereferences



details:   https://anonhg.NetBSD.org/src/rev/366f14abd425
branches:  trunk
changeset: 349222:366f14abd425
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Dec 01 02:15:20 2016 +0000

description:
fix CID 1396600: Null pointer dereferences

diffstat:

 sys/net/if_spppsubr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e8209ed4bf09 -r 366f14abd425 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Thu Dec 01 02:15:08 2016 +0000
+++ b/sys/net/if_spppsubr.c     Thu Dec 01 02:15:20 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.159 2016/11/25 05:03:12 knakahara Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.160 2016/12/01 02:15:20 knakahara Exp $       */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.159 2016/11/25 05:03:12 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.160 2016/12/01 02:15:20 knakahara Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -4909,7 +4909,7 @@
        else if (dest != NULL)
                hisaddr = ntohl(dest->sin_addr.s_addr);
 
-       if (si != NULL) {
+       if (si != NULL && dest != NULL) {
                int error;
                struct sockaddr_in new_sin = *si;
                struct sockaddr_in new_dst = *dest;



Home | Main Index | Thread Index | Old Index