]> granicus.if.org Git - sudo/commitdiff
The pointer to the siginfo_t struct in a signal handler may be NULL.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 May 2012 15:00:07 +0000 (11:00 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 May 2012 15:00:07 +0000 (11:00 -0400)
--HG--
branch : 1.7

exec.c

diff --git a/exec.c b/exec.c
index 965f89d758195d3fd4e79d02153258762a18d5b7..9d9572a44d7bf8e64da498fd728fde561d17e7d8 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -661,7 +661,7 @@ handler_nofwd(s, info, context)
     unsigned char signo = (unsigned char)s;
 
     /* Only forward user-generated signals. */
-    if (info->si_code <= 0) {
+    if (info == NULL || info->si_code <= 0) {
        /*
         * The pipe is non-blocking, if we overflow the kernel's pipe
         * buffer we drop the signal.  This is not a problem in practice.