about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-07 01:35:18 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-07 01:36:24 +0200
commit785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de (patch)
treeb2960c2d60ac46398f3ad28ad7735d75f8071e50 /hurd
parent02937d825a71636c13b3f4229e5d6c9e54e327d5 (diff)
downloadglibc-785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de.tar.gz
glibc-785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de.tar.xz
glibc-785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de.zip
hurd: Reject raising invalid signals
* hurd/hurd-raise.c (_hurd_raise_signal): Return  EINVAL if signo <= 0
or signo >= NSI.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurd-raise.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hurd/hurd-raise.c b/hurd/hurd-raise.c
index d53fd417d2..af464377b6 100644
--- a/hurd/hurd-raise.c
+++ b/hurd/hurd-raise.c
@@ -28,6 +28,9 @@ int
 _hurd_raise_signal (struct hurd_sigstate *ss,
 		    int signo, const struct hurd_signal_detail *detail)
 {
+  if (signo <= 0 || signo >= NSIG)
+    return EINVAL;
+
   if (ss == NULL)
     {
       ss = _hurd_self_sigstate ();