]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeCapsuleLibFmp: Add NULL check to the return buffers
authorStar Zeng <star.zeng@intel.com>
Thu, 2 Aug 2018 01:14:59 +0000 (09:14 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 3 Aug 2018 00:29:24 +0000 (08:29 +0800)
Add NULL check to the return buffers from GetFmpHandleBufferByType().

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Hao A Wu <Hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao A Wu <Hao.a.wu@intel.com>
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c

index 85848279d44c370861302010aabd9dca6861a302..91c6849a46588bf2d89f000d08d68a8462cb0579 100644 (file)
@@ -1225,7 +1225,9 @@ ProcessFmpCapsuleImage (
                &HandleBuffer,\r
                &ResetRequiredBuffer\r
                );\r
-    if (EFI_ERROR(Status)) {\r
+    if (EFI_ERROR(Status) ||\r
+        (HandleBuffer == NULL) ||\r
+        (ResetRequiredBuffer == NULL)) {\r
       NotReady = TRUE;\r
       RecordFmpCapsuleStatus (\r
         NULL,\r