Reviewed-by: Hao A Wu <hao.a...@intel.com> Best Regards, Hao Wu
> -----Original Message----- > From: Jeff Brasen <jbra...@nvidia.com> > Sent: Saturday, September 12, 2020 1:17 AM > To: devel@edk2.groups.io > Cc: Wu, Hao A <hao.a...@intel.com>; Ni, Ray <ray...@intel.com>; Jeff > Brasen <jbra...@nvidia.com> > Subject: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL > pointer check > > Add check for NULL HostAddress in AllocateBuffer as required by UEFI > specification. > > Signed-off-by: Jeff Brasen <jbra...@nvidia.com> > --- > .../NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable > PciDeviceIo.c > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable > PciDeviceIo.c > index a40c1a9593..363c4a765b 100644 > --- > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable > PciDeviceIo.c > +++ > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable > Pc > +++ iDeviceIo.c > @@ -856,6 +856,10 @@ CoherentPciIoAllocateBuffer ( > return EFI_UNSUPPORTED; } + if (HostAddress == NULL) {+ return > EFI_INVALID_PARAMETER;+ }+ if ((MemoryType != EfiBootServicesData) > && (MemoryType != EfiRuntimeServicesData)) { return > EFI_INVALID_PARAMETER;-- > 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65241): https://edk2.groups.io/g/devel/message/65241 Mute This Topic: https://groups.io/mt/76784482/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-