diff options
Diffstat (limited to 'MdePkg/Library/BasePciCf8Lib')
-rw-r--r-- | MdePkg/Library/BasePciCf8Lib/PciLib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MdePkg/Library/BasePciCf8Lib/PciLib.c b/MdePkg/Library/BasePciCf8Lib/PciLib.c index fe27c850c1..108c95291c 100644 --- a/MdePkg/Library/BasePciCf8Lib/PciLib.c +++ b/MdePkg/Library/BasePciCf8Lib/PciLib.c @@ -1298,6 +1298,11 @@ PciCf8ReadBuffer ( {
UINTN EndAddress;
+ ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
+ ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
+ ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);
+ ASSERT (Buffer != NULL);
+
EndAddress = StartAddress + Size;
if (StartAddress < EndAddress && (StartAddress & 1)) {
@@ -1382,6 +1387,11 @@ PciCf8WriteBuffer ( {
UINTN EndAddress;
+ ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
+ ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
+ ASSERT ((StartAddress + Size - 1) <= 0x0FFFFFFF);
+ ASSERT (Buffer != NULL);
+
EndAddress = StartAddress + Size;
if ((StartAddress < EndAddress) && ((StartAddress & 1)!= 0)) {
|