diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 22050d83220..8c412d5c8b7 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.64 2005/09/27 21:45:20 miod Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.65 2005/11/05 16:04:20 uwe Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -920,6 +920,9 @@ wsdisplayioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) if (ISWSDISPLAYCTL(dev)) return (wsdisplay_cfg_ioctl(sc, cmd, data, flag, p)); + if (WSDISPLAYSCREEN(dev) >= WSDISPLAY_MAXSCREEN) + return (ENODEV); + if ((scr = sc->sc_scr[WSDISPLAYSCREEN(dev)]) == NULL) return (ENXIO); |