Browse Source

fix null pointer dereference introduced in last sigprocmask commit

Rich Felker 14 years ago
parent
commit
96f2197494
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/signal/sigprocmask.c

+ 1 - 1
src/signal/sigprocmask.c

@@ -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);