mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 06:58:10 +00:00
[PCIX]
Fix Device_SaveCurrentSettings: do not reference BarArray too soon if the index is out of bounds (in that case it means we are handling a ROM "BAR"). CID 716153, reported by Victor Martinez Calvo. CORE-11215 #resolve svn path=/trunk/; revision=72050
This commit is contained in:
parent
d35cbe1643
commit
155818fc70
1 changed files with 5 additions and 5 deletions
|
@ -46,12 +46,12 @@ Device_SaveCurrentSettings(IN PPCI_CONFIGURATOR_CONTEXT Context)
|
|||
CmDescriptor->u.Generic.Start.HighPart = 0;
|
||||
CmDescriptor->u.Generic.Length = IoDescriptor->u.Generic.Length;
|
||||
|
||||
/* Read the actual BAR value */
|
||||
Bar = BarArray[i];
|
||||
|
||||
/* Check which BAR is being processed now */
|
||||
if (i != PCI_TYPE0_ADDRESSES)
|
||||
/* Check if we're handling PCI BARs, or the ROM BAR */
|
||||
if (i < PCI_TYPE0_ADDRESSES)
|
||||
{
|
||||
/* Read the actual BAR value */
|
||||
Bar = BarArray[i];
|
||||
|
||||
/* Check if this is an I/O BAR */
|
||||
if (Bar & PCI_ADDRESS_IO_SPACE)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue