summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads/signals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpthread/linuxthreads/signals.c b/libpthread/linuxthreads/signals.c
index c08125579..61b411aba 100644
--- a/libpthread/linuxthreads/signals.c
+++ b/libpthread/linuxthreads/signals.c
@@ -113,7 +113,7 @@ int __pthread_sigaction(int sig, const struct sigaction * act,
newactp = NULL;
if (__libc_sigaction(sig, newactp, oact) == -1)
{
- if (act)
+ if (act && (sig > 0 && sig < NSIG))
__sighandler[sig].old = (arch_sighandler_t) old;
return -1;
}