mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 00:02:44 +00:00
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:
parent
6072387d65
commit
89b37cfe4b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24283
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user