mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL pointer check
Add check for NULL HostAddress in AllocateBuffer as required by UEFI specification. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
b5701a4c7a
commit
698d3d7726
|
@ -856,6 +856,10 @@ CoherentPciIoAllocateBuffer (
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (HostAddress == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if ((MemoryType != EfiBootServicesData) &&
|
||||
(MemoryType != EfiRuntimeServicesData)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
|
Loading…
Reference in New Issue