summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
index ccec7d7244..eabbe4989b 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
@@ -1,7 +1,7 @@
/**@file
Implement all interfaces for EFI_PCI_IO_PROTOCOL.
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -379,6 +379,10 @@ PciIoMemRead (
return EFI_INVALID_PARAMETER;
}
+ if (Buffer == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeMem, Width, Count, &Offset);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
@@ -439,6 +443,10 @@ PciIoMemWrite (
return EFI_INVALID_PARAMETER;
}
+ if (Buffer == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeMem, Width, Count, &Offset);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
@@ -499,6 +507,10 @@ PciIoIoRead (
return EFI_INVALID_PARAMETER;
}
+ if (Buffer == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeIo, Width, Count, &Offset);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
@@ -559,6 +571,10 @@ PciIoIoWrite (
return EFI_INVALID_PARAMETER;
}
+ if (Buffer == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Status = PciIoVerifyBarAccess (PciIoDevice, BarIndex, PciBarTypeIo, Width, Count, &Offset);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;