X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBasePciLibPciExpress%2FPciLib.c;h=1b543da3aab7be0da78aed953ce89e98e89b2e1f;hb=e29e52e7c0d1cfe0de872fbb5ebe6c77bba0c30d;hp=7c6097495518fd9224700d620b7c819af8aff770;hpb=0ffa12863e9e60cfd1900e3a83b21f32f89afdf2;p=mirror_edk2.git diff --git a/MdePkg/Library/BasePciLibPciExpress/PciLib.c b/MdePkg/Library/BasePciLibPciExpress/PciLib.c index 7c60974955..1b543da3aa 100644 --- a/MdePkg/Library/BasePciLibPciExpress/PciLib.c +++ b/MdePkg/Library/BasePciLibPciExpress/PciLib.c @@ -1011,8 +1011,7 @@ PciBitFieldAndThenOr32 ( If StartAddress > 0x0FFFFFFF, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). - If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT(). - If Buffer is NULL, then ASSERT(). + If Size > 0 and Buffer is NULL, then ASSERT(). @param StartAddress Starting address that encodes the PCI Bus, Device, Function and Register. @@ -1047,8 +1046,7 @@ PciReadBuffer ( If StartAddress > 0x0FFFFFFF, then ASSERT(). If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT(). - If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT(). - If Buffer is NULL, then ASSERT(). + If Size > 0 and Buffer is NULL, then ASSERT(). @param StartAddress Starting address that encodes the PCI Bus, Device, Function and Register.