about summary refs log tree commit diff
path: root/src/signal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-20 15:16:04 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-20 15:16:04 -0500
commit96f2197494791f5884c01b5caa908074cc7e90a6 (patch)
tree9c5fbfb1fadfa1f0e511d3f18fad7cc364f0f883 /src/signal
parenteee150f39c294883841d4f3ad9ce290ea1529a9e (diff)
downloadmusl-96f2197494791f5884c01b5caa908074cc7e90a6.tar.gz
musl-96f2197494791f5884c01b5caa908074cc7e90a6.tar.xz
musl-96f2197494791f5884c01b5caa908074cc7e90a6.zip
fix null pointer dereference introduced in last sigprocmask commit
Diffstat (limited to 'src/signal')
-rw-r--r--src/signal/sigprocmask.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal/sigprocmask.c b/src/signal/sigprocmask.c
index db27f12a..1bc5baa6 100644
--- a/src/signal/sigprocmask.c
+++ b/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);