diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-11-21 18:21:35 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-11-21 18:21:35 +0000 |
commit | 9c6132720f2446887a15a08271dd8704b2f31893 (patch) | |
tree | 224d52a2782034d54da2b8c16dfe922e48b290ac | |
parent | 3885978f9a2c6ce4f264a7466f04a662304e9713 (diff) |
return -1 for negative mmap offset; mrg@netbsd.org
-rw-r--r-- | sys/arch/pmax/dev/fb_usrreq.c | 3 |
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); |