fix null pointer dereference introduced in last sigprocmask commit
authorRich Felker <dalias@aerifal.cx>
Sun, 20 Feb 2011 20:16:04 +0000 (15:16 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 20 Feb 2011 20:16:04 +0000 (15:16 -0500)
src/signal/sigprocmask.c

index db27f12a8ff58782c388a5f4528d5e906cfaa2dc..1bc5baa6c88809d49b7bf861c2b611ef4a370e1e 100644 (file)
@@ -12,7 +12,7 @@ int __sigprocmask(int how, const sigset_t *set, sigset_t *old)
 {
        sigset_t tmp;
        /* Disallow blocking thread control signals */
-       if (how != SIG_UNBLOCK) {
+       if (set && how != SIG_UNBLOCK) {
                tmp = *set;
                set = &tmp;
                sigdelset(&tmp, SIGCANCEL);