Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/vax/vax Apply patch (requested by ragge):
details: https://anonhg.NetBSD.org/src/rev/11540ac97610
branches: netbsd-1-4
changeset: 470076:11540ac97610
user: he <he%NetBSD.org@localhost>
date: Mon Jan 17 18:40:28 2000 +0000
description:
Apply patch (requested by ragge):
Prevent a crash if a bogus sigcontext pointer is passed to
sigreturn().
diffstat:
sys/arch/vax/vax/machdep.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 3784497cc0fd -r 11540ac97610 sys/arch/vax/vax/machdep.c
--- a/sys/arch/vax/vax/machdep.c Mon Jan 17 18:36:04 2000 +0000
+++ b/sys/arch/vax/vax/machdep.c Mon Jan 17 18:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.76.2.2 1999/12/16 22:49:20 he Exp $ */
+/* $NetBSD: machdep.c,v 1.76.2.3 2000/01/17 18:40:28 he Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -483,6 +483,8 @@
scf = p->p_addr->u_pcb.framep;
cntx = SCARG(uap, sigcntxp);
+ if (uvm_useracc((caddr_t)cntx, sizeof (*cntx), B_READ) == 0)
+ return EINVAL;
/* Compatibility mode? */
if ((cntx->sc_ps & (PSL_IPL | PSL_IS)) ||
@@ -521,6 +523,8 @@
scf = p->p_addr->u_pcb.framep;
cntx = SCARG(uap, sigcntxp);
+ if (uvm_useracc((caddr_t)cntx, sizeof (*cntx), B_READ) == 0)
+ return EINVAL;
/* Compatibility mode? */
if ((cntx->sc_ps & (PSL_IPL | PSL_IS)) ||
Home |
Main Index |
Thread Index |
Old Index