diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-09-10 17:40:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-09-10 17:40:29 +0000 |
commit | 5e0889da396b35ef7d57d43dca6f09899e4c8d66 (patch) | |
tree | 4540f61976b23a11f629df32fd0dd18d745a38ce /linuxthreads | |
parent | 26afaa635796fee008c09155865ee3886bced9c4 (diff) | |
download | glibc-5e0889da396b35ef7d57d43dca6f09899e4c8d66.tar.gz |
Update.
1998-09-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/locale.texi: Fix typos.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 5 | ||||
-rw-r--r-- | linuxthreads/signals.c | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 39ffba76d2..2812806fe7 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * signals.c (sigaction): Check that sig is less than NSIG to avoid + array index overflow. + 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com> * sysdeps/pthread/semaphore.h: New file. diff --git a/linuxthreads/signals.c b/linuxthreads/signals.c index a6674bfc0d..5444ef73f3 100644 --- a/linuxthreads/signals.c +++ b/linuxthreads/signals.c @@ -102,7 +102,8 @@ int sigaction(int sig, const struct sigaction * act, if (act) { newact = *act; - if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL) + if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL + && sig < NSIG) newact.sa_handler = pthread_sighandler; newactp = &newact; } @@ -110,9 +111,13 @@ int sigaction(int sig, const struct sigaction * act, newactp = NULL; if (__sigaction(sig, newactp, oact) == -1) return -1; - if (oact != NULL) oact->sa_handler = sighandler[sig]; - if (act) - sighandler[sig] = act->sa_handler; + if (sig < NSIG) + { + if (oact != NULL) + oact->sa_handler = sighandler[sig]; + if (act) + sighandler[sig] = act->sa_handler; + } return 0; } |