public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/vineet/upstream-work] hurd: Reject raising invalid signals
@ 2020-06-19  2:43 Vineet Gupta
  0 siblings, 0 replies; only message in thread
From: Vineet Gupta @ 2020-06-19  2:43 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de

commit 785ec62dbd37b0b236c9a7fcc0ac71a2aeb472de
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Jun 7 01:35:18 2020 +0200

    hurd: Reject raising invalid signals
    
    * hurd/hurd-raise.c (_hurd_raise_signal): Return  EINVAL if signo <= 0
    or signo >= NSI.

Diff:
---
 hurd/hurd-raise.c | 3 +++
 1 file changed, 3 insertions(+)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-19  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19  2:43 [glibc/vineet/upstream-work] hurd: Reject raising invalid signals Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).