]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg EhciPei: Also check Buf against NULL to return error
authorStar Zeng <star.zeng@intel.com>
Mon, 20 Nov 2017 07:30:22 +0000 (15:30 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 21 Nov 2017 03:27:19 +0000 (11:27 +0800)
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>
MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c

index 606a53db1da1fe21fbdf43676ec1e4b0ab67d527..6b19362699b10619b8cbcb0fc34a02d386d5cbb3 100644 (file)
@@ -134,7 +134,7 @@ EhcInitSched (
              &Map\r
              );\r
 \r
-  if (EFI_ERROR (Status)) {\r
+  if (EFI_ERROR (Status) || (Buf == NULL)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r