]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used
authorStar Zeng <star.zeng@intel.com>
Fri, 13 Apr 2018 06:32:11 +0000 (14:32 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 20 Apr 2018 06:28:45 +0000 (14:28 +0800)
DEBUG((
  DEBUG_ERROR,
  "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n",
  Index,
  ItemOffsetList[Index],
  Index,                       // Should be Index - 1
  ItemOffsetList[Index - 1]
  ));

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: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c

index 555c5971d00d231cf9d4a381faba346e33fd06e6..05fcd92deb00a9aaf1002653fed7d52439313564 100644 (file)
@@ -250,7 +250,7 @@ ValidateFmpCapsule (
     //\r
     if (Index > 0) {\r
       if (ItemOffsetList[Index] <= ItemOffsetList[Index - 1]) {\r
-        DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index, ItemOffsetList[Index - 1]));\r
+        DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index - 1, ItemOffsetList[Index - 1]));\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r