diff options
author | 2007-01-02 22:22:19 +0000 | |
---|---|---|
committer | 2007-01-02 22:22:19 +0000 | |
commit | 1791d3ed17a762b418dc616f39f7e31040d86aa9 (patch) | |
tree | 79b831c5665c07e2371c2a0dbc7e226ff98153b0 | |
parent | sync (diff) | |
download | wireguard-openbsd-1791d3ed17a762b418dc616f39f7e31040d86aa9.tar.xz wireguard-openbsd-1791d3ed17a762b418dc616f39f7e31040d86aa9.zip |
do not permit agp_ioctl if the methods are invalid; ok miod
-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) |