artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
172658c
)
have mapdev() panic if size == 0 to be safe (catches config errors)
author
chuck
<chuck@openbsd.org>
Sat, 13 Jan 1996 03:12:12 +0000
(
03:12
+0000)
committer
chuck
<chuck@openbsd.org>
Sat, 13 Jan 1996 03:12:12 +0000
(
03:12
+0000)
sys/arch/sparc/sparc/machdep.c
patch
|
blob
|
history
diff --git
a/sys/arch/sparc/sparc/machdep.c
b/sys/arch/sparc/sparc/machdep.c
index
b07e611
..
9529ea3
100644
(file)
--- 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 {