diff options
-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); |