MdeModulePkg CapsuleApp: Fix -D failed to dump Nest FMP capsule
authorStar Zeng <star.zeng@intel.com>
Thu, 19 Jul 2018 03:03:25 +0000 (11:03 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 27 Jul 2018 08:04:13 +0000 (16:04 +0800)
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c

index 97f1893..4c85e8c 100644 (file)
@@ -214,7 +214,7 @@ IsNestedFmpCapsule (
   // FMP GUID after ESRT one\r
   //\r
   NestedCapsuleHeader = (EFI_CAPSULE_HEADER *)((UINT8 *)CapsuleHeader + CapsuleHeader->HeaderSize);\r
-  NestedCapsuleSize = (UINTN)CapsuleHeader + CapsuleHeader->HeaderSize - (UINTN)NestedCapsuleHeader;\r
+  NestedCapsuleSize = (UINTN)CapsuleHeader + CapsuleHeader->CapsuleImageSize- (UINTN)NestedCapsuleHeader;\r
   if (NestedCapsuleSize < sizeof(EFI_CAPSULE_HEADER)) {\r
     return FALSE;\r
   }\r