mirror of https://github.com/acidanthera/audk.git
Terminate the Capability List traversal if the Capability Pointer is less than 0x40, or the Capability Pointer is not aligned on a 32-bit boundary.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8375 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
20610fa85c
commit
94853f20f3
|
@ -433,11 +433,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
while (CapabilityPtr > 0x3F) {
|
||||
//
|
||||
// Mask it to DWORD alignment per PCI spec
|
||||
//
|
||||
CapabilityPtr &= 0xFC;
|
||||
while ((CapabilityPtr >= 0x40) && ((CapabilityPtr & 0x03) == 0x00)) {
|
||||
PciIoDevice->PciIo.Pci.Read (
|
||||
&PciIoDevice->PciIo,
|
||||
EfiPciIoWidthUint16,
|
||||
|
|
Loading…
Reference in New Issue