diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-02 11:22:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-02 11:22:46 +0000 |
commit | 343879da2f1cf08b2a1b5390a13244334f657d96 (patch) | |
tree | 7196b697ded83dc94903df10b9ff73176fee9169 /sys/dev/pci/vga_pci.c | |
parent | fc05ad7288235d80f6cec35e8e4f5cac0da9452d (diff) |
Do not go one bar too far down the road; found by Parfait; ok oga
Diffstat (limited to 'sys/dev/pci/vga_pci.c')
-rw-r--r-- | sys/dev/pci/vga_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 5defbbda363..b41b668e1d1 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.39 2008/11/22 21:26:48 oga Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.40 2009/06/02 11:22:45 deraadt Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -395,7 +395,7 @@ vga_pci_bar_init(struct vga_pci_softc *dev, struct pci_attach_args *pa) struct vga_pci_bar* vga_pci_bar_info(struct vga_pci_softc *dev, int no) { - if (dev == NULL || no > VGA_PCI_MAX_BARS) + if (dev == NULL || no >= VGA_PCI_MAX_BARS) return (NULL); return (dev->bars[no]); } |