From: deraadt Date: Thu, 30 Nov 1995 22:52:05 +0000 (+0000) Subject: prevent access to page 0 of virtual space X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f7daf2579bfe9421813cc4ae251f83d343916090;p=openbsd prevent access to page 0 of virtual space --- diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c index 4330f7a459f..ad1173a50b6 100644 --- a/sys/arch/mvme68k/mvme68k/mem.c +++ b/sys/arch/mvme68k/mvme68k/mem.c @@ -1,4 +1,4 @@ -/* $Id: mem.c,v 1.2 1995/11/07 08:50:22 deraadt Exp $ */ +/* $Id: mem.c,v 1.3 1995/11/30 22:52:05 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -169,6 +169,8 @@ mmrw(dev, uio, flags) if (!kernacc((caddr_t)v, c, uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) return (EFAULT); + if (v < NBPG) + return (EFAULT); error = uiomove((caddr_t)v, c, uio); continue;