]> git.proxmox.com Git - mirror_qemu.git/commit
pseries: Fix array overrun bug in PCI code
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 29 Nov 2011 06:21:39 +0000 (07:21 +0100)
committerAndrzej Zaborowski <balrog@zabor.org>
Mon, 5 Dec 2011 20:38:50 +0000 (21:38 +0100)
commit81584fd50deb3c324cafc854a946dbb6b83c2fc6
treed6c2cfce3b58c8c151d730c8aa299c0738d0f391
parentf4fc247b0df2dfccae80618ccf6741a9b9e50e49
pseries: Fix array overrun bug in PCI code

spapr_populate_pci_devices() containd a loop with PCI_NUM_REGIONS (7)
iterations.  However this overruns the 'bars' global array, which only has
6 elements. In fact we only want to run this loop for things listed in the
bars array, so this patch corrects the loop bounds to reflect that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/spapr_pci.c