Change sigreturn() to return EFAULT if it is passed an

address outside of the process's address space.
Now it matches its man page :-).  Closes PR# 2682.

Discussed with: bde
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
This commit is contained in:
Mike Pritchard 1997-03-25 23:43:01 +00:00
parent 6072387d65
commit 89b37cfe4b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24283
2 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.230 1997/03/22 18:52:10 kato Exp $
* $Id: machdep.c,v 1.231 1997/03/24 11:23:29 bde Exp $
*/
#include "npx.h"
@ -568,7 +568,7 @@ sigreturn(p, uap, retval)
((caddr_t)scp - offsetof(struct sigframe, sf_sc));
if (useracc((caddr_t)fp, sizeof (*fp), B_WRITE) == 0)
return(EINVAL);
return(EFAULT);
/*
* Don't allow users to change privileged or reserved flags.

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.230 1997/03/22 18:52:10 kato Exp $
* $Id: machdep.c,v 1.231 1997/03/24 11:23:29 bde Exp $
*/
#include "npx.h"
@ -568,7 +568,7 @@ sigreturn(p, uap, retval)
((caddr_t)scp - offsetof(struct sigframe, sf_sc));
if (useracc((caddr_t)fp, sizeof (*fp), B_WRITE) == 0)
return(EINVAL);
return(EFAULT);
/*
* Don't allow users to change privileged or reserved flags.