From: Star Zeng Date: Mon, 20 Nov 2017 07:30:22 +0000 (+0800) Subject: MdeModulePkg EhciPei: Also check Buf against NULL to return error X-Git-Tag: edk2-stable201903~3053 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a89b923ea90ed178f74df42ae344cc0a3b24380b MdeModulePkg EhciPei: Also check Buf against NULL to return error Cc: Hao Wu Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Hao Wu --- diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c index 606a53db1d..6b19362699 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c @@ -134,7 +134,7 @@ EhcInitSched ( &Map ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || (Buf == NULL)) { return EFI_OUT_OF_RESOURCES; }