diff options
author | neel <neel@FreeBSD.org> | 2013-11-06 22:35:52 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-11-06 22:35:52 +0000 |
commit | da8821dbf4e7c491fa0bb307b55caa5affd04e6c (patch) | |
tree | 22bf541237f9ae90c602f2378926fc79740f2f80 | |
parent | 2bf8e2c5a41757e5d3af5159dd94b14f3ba31d4c (diff) | |
download | FreeBSD-src-da8821dbf4e7c491fa0bb307b55caa5affd04e6c.zip FreeBSD-src-da8821dbf4e7c491fa0bb307b55caa5affd04e6c.tar.gz |
Fix an off-by-one error when iterating over the emulated PCI BARs.
Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
-rw-r--r-- | usr.sbin/bhyve/pci_emul.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index bbaac23..3820b04 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -1252,7 +1252,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi, uint32_t new, int bytes) * If the MMIO or I/O address space decoding has changed then * register/unregister all BARs that decode that address space. */ - for (i = 0; i < PCI_BARMAX; i++) { + for (i = 0; i <= PCI_BARMAX; i++) { switch (pi->pi_bar[i].type) { case PCIBAR_NONE: case PCIBAR_MEMHI64: |