diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-01-02 22:22:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-01-02 22:22:20 +0000 |
commit | eab55a528a14418875c8a18a7e289579a5630951 (patch) | |
tree | 46fc100e430dd465514e5545caec6279578509c4 /sys/dev/pci/agp.c | |
parent | 7a44d56d9a0e095c28c00a3fc3040e901017da43 (diff) |
do not permit agp_ioctl if the methods are invalid; ok miod
Diffstat (limited to 'sys/dev/pci/agp.c')
-rw-r--r-- | sys/dev/pci/agp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 91d764a933f..1d3dde15a28 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.2 2006/12/30 19:15:30 miod Exp $ */ +/* $OpenBSD: agp.c,v 1.3 2007/01/02 22:22:19 deraadt Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -146,6 +146,9 @@ agp_ioctl(void *v, u_long cmd, caddr_t addr, int flag, struct proc *pb) vsize_t size; int error = 0; + if (sc->sc_methods == NULL) + return (ENXIO); + switch (cmd) { case AGPIOC_INFO: if (!sc->sc_chipc) |