From: chuck Date: Sat, 13 Jan 1996 03:12:12 +0000 (+0000) Subject: have mapdev() panic if size == 0 to be safe (catches config errors) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e9aa562604c86a9e35ca137dfcf81a9d413cc230;p=openbsd have mapdev() panic if size == 0 to be safe (catches config errors) --- diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index b07e6110b47..9529ea31b0e 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -873,6 +873,8 @@ mapdev(rr, virt, offset, size, bustype) iobase = IODEV_BASE; size = round_page(size); + if (size == 0) panic("mapdev: zero size"); + if (virt) v = trunc_page(virt); else {