diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-18 20:02:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-18 20:02:09 +0000 |
commit | 2b798f1ef1b730d89acf02f90c23e7e7bba945ff (patch) | |
tree | 614415894170eaa41af56e46d30fb1a79da6c369 /sys/arch | |
parent | 8d8dc0a3df4e4f982dfa3ffbde48409aac6ab25f (diff) |
Do not dereference NULL stupidly in trap() when checking if a process needs
its stack to grow (sync with other m68k ports, which are safe).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/trap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index a30ef9bdf48..50b358f472f 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.52 2004/01/15 17:22:27 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.53 2004/04/18 20:02:08 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -593,7 +593,8 @@ copyfault: * the current limit and we need to reflect that as an access * error. */ - if ((caddr_t)va >= vm->vm_maxsaddr && map != kernel_map) { + if ((vm != NULL && (caddr_t)va >= vm->vm_maxsaddr) + && map != kernel_map) { if (rv == 0) { u_int nss; |