From e9aa562604c86a9e35ca137dfcf81a9d413cc230 Mon Sep 17 00:00:00 2001 From: chuck Date: Sat, 13 Jan 1996 03:12:12 +0000 Subject: [PATCH] have mapdev() panic if size == 0 to be safe (catches config errors) --- sys/arch/sparc/sparc/machdep.c | 2 ++ 1 file changed, 2 insertions(+) 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 { -- 2.20.1