Reviewed-by: Hao Wu <hao.a...@intel.com> Best Regards, Hao Wu
> -----Original Message----- > From: Zeng, Star > Sent: Thursday, November 23, 2017 9:04 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star; Wu, Hao A; Yao, Jiewen > Subject: [PATCH] MdeModulePkg UhciPei: Also check TempPtr against NULL > to return error > > Cc: Hao Wu <hao.a...@intel.com> > Cc: Jiewen Yao <jiewen....@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng <star.z...@intel.com> > --- > MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > index b7d60db0c94e..482c404c0eae 100644 > --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > @@ -2863,8 +2863,8 @@ CreateMemoryBlock ( > &MappedAddr, > &Mapping > ); > - if (EFI_ERROR (Status)) { > - return Status; > + if (EFI_ERROR (Status) || (TempPtr == NULL)) { > + return EFI_OUT_OF_RESOURCES; > } > > Ptr = TempPtr; > -- > 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel