summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-11-21 18:21:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-11-21 18:21:35 +0000
commit9c6132720f2446887a15a08271dd8704b2f31893 (patch)
tree224d52a2782034d54da2b8c16dfe922e48b290ac
parent3885978f9a2c6ce4f264a7466f04a662304e9713 (diff)
return -1 for negative mmap offset; mrg@netbsd.org
-rw-r--r--sys/arch/pmax/dev/fb_usrreq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/arch/pmax/dev/fb_usrreq.c b/sys/arch/pmax/dev/fb_usrreq.c
index f312dd66ae8..c1829eab5e2 100644
--- a/sys/arch/pmax/dev/fb_usrreq.c
+++ b/sys/arch/pmax/dev/fb_usrreq.c
@@ -245,6 +245,9 @@ fbmmap(dev, off, prot)
int len;
register struct fbinfo *fi;
+ if (off < 0)
+ return (-1);
+
if (minor(dev) >= fbcd.cd_ndevs ||
(fi = fbcd.cd_devs[minor(dev)]) == NULL)
return(-1);