]> 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 11:57:01 +0000 (07:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 May 2012 11:57:01 +0000 (07:57 -0400)
src/exec.c

index 71b639bae073916cf3892d34cdf2400215d95c87..fd5cb26ae738192503dad2c9d198273b2e5a835d 100644 (file)
@@ -636,7 +636,7 @@ handler_nofwd(int s, siginfo_t *info, void *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.