hurd: Reject raising invalid signals

* hurd/hurd-raise.c (_hurd_raise_signal): Return  EINVAL if signo <= 0
or signo >= NSI.
This commit is contained in:
Samuel Thibault 2020-06-07 01:35:18 +02:00
parent 02937d825a
commit 785ec62dbd

View File

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