summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2017-11-20 15:30:22 +0800
committerStar Zeng <star.zeng@intel.com>2017-11-21 11:27:19 +0800
commita89b923ea90ed178f74df42ae344cc0a3b24380b (patch)
tree9f2d013f57c851d0c7a5c672c3c377bdaec2d4df /MdeModulePkg
parent8d92f819f5a153c1cda5d2978e6434b53bd092a4 (diff)
downloadedk2-a89b923ea90ed178f74df42ae344cc0a3b24380b.tar.gz
edk2-a89b923ea90ed178f74df42ae344cc0a3b24380b.tar.bz2
edk2-a89b923ea90ed178f74df42ae344cc0a3b24380b.zip
MdeModulePkg EhciPei: Also check Buf against NULL to return error
Cc: Hao Wu <hao.a.wu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c2
1 files changed, 1 insertions, 1 deletions
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;
}