From f7daf2579bfe9421813cc4ae251f83d343916090 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 30 Nov 1995 22:52:05 +0000 Subject: [PATCH] prevent access to page 0 of virtual space --- sys/arch/mvme68k/mvme68k/mem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.20.1