check that signum is valid correctly.
This commit is contained in:
parent
25c67c975f
commit
5fd3b99d04
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: irix_signal.c,v 1.30 2004/11/15 23:28:50 christos Exp $ */
|
/* $NetBSD: irix_signal.c,v 1.31 2004/12/22 18:16:47 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
|
* Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.30 2004/11/15 23:28:50 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.31 2004/12/22 18:16:47 christos Exp $");
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
|
@ -1013,9 +1013,10 @@ irix_sys_sigaction(l, v, retval)
|
||||||
* The signal trampoline is hence saved in the p_emuldata field
|
* The signal trampoline is hence saved in the p_emuldata field
|
||||||
* of struct proc, in an array (one element for each signal)
|
* of struct proc, in an array (one element for each signal)
|
||||||
*/
|
*/
|
||||||
if (SCARG(uap, signum) < 0)
|
signum = SCARG(uap, signum);
|
||||||
return(EINVAL);
|
if (signum < 0 || signum >= SVR4_NSIG)
|
||||||
signum = svr4_to_native_signo[SCARG(uap, signum)];
|
return EINVAL;
|
||||||
|
signum = svr4_to_native_signo[signum];
|
||||||
ied = (struct irix_emuldata *)(p->p_emuldata);
|
ied = (struct irix_emuldata *)(p->p_emuldata);
|
||||||
|
|
||||||
#ifdef DEBUG_IRIX
|
#ifdef DEBUG_IRIX
|
||||||
|
|
Loading…
Reference in New Issue