Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/linux/common CID 980928: fix NULL pointer dereferece



details:   https://anonhg.NetBSD.org/src/rev/515a945ca6b6
branches:  trunk
changeset: 821886:515a945ca6b6
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Feb 20 16:26:30 2017 +0000

description:
CID 980928: fix NULL pointer dereferece

diffstat:

 sys/compat/linux/common/linux_signal.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 52bf23b7f5f1 -r 515a945ca6b6 sys/compat/linux/common/linux_signal.c
--- a/sys/compat/linux/common/linux_signal.c    Mon Feb 20 16:05:34 2017 +0000
+++ b/sys/compat/linux/common/linux_signal.c    Mon Feb 20 16:26:30 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_signal.c,v 1.77 2015/11/14 13:29:35 christos Exp $       */
+/*     $NetBSD: linux_signal.c,v 1.78 2017/02/20 16:26:30 rin Exp $    */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.77 2015/11/14 13:29:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.78 2017/02/20 16:26:30 rin Exp $");
 
 #define COMPAT_LINUX 1
 
@@ -355,7 +355,8 @@
                obsa.sa_flags = 0;
        } else {
 #ifdef LINUX_SA_RESTORER
-               if ((nlsa.linux_sa_flags & LINUX_SA_RESTORER) &&
+               if (SCARG(uap, nsa) &&
+                   (nlsa.linux_sa_flags & LINUX_SA_RESTORER) &&
                    (tramp = nlsa.linux_sa_restorer) != NULL)
                                vers = 2;
 #endif



Home | Main Index | Thread Index | Old Index