summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-04-17 07:33:14 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-04-17 07:33:14 +0000
commit1767898469a83dc29d5a64fd5e9e582ce7dca107 (patch)
tree2cc2dc3de6f34aac77d40eb289e72092db1e1bba /sys/arch/i386
parentcf0a6ecb1260d44730ca7455c2a62d68d13d2aa3 (diff)
make sure user address is in user space in copyinstr. ok weingart@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/locore.s4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index bf53884d22c..5254c3e7932 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.82 2005/02/10 04:06:01 weingart Exp $ */
+/* $OpenBSD: locore.s,v 1.83 2005/04/17 07:33:13 tedu Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1298,6 +1298,8 @@ ENTRY(copyinstr)
1: decl %edx
jz 2f
+ cmpl $VM_MAXUSER_ADDRESS,%esi
+ jae _C_LABEL(copystr_fault)
lodsb
stosb
testb %al,%al