summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-04-13 14:32:11 +0800
committerStar Zeng <star.zeng@intel.com>2018-07-09 13:38:58 +0800
commita84e7870ae3a84f21f7abb10dc5a62af4ca20b75 (patch)
treeae23b6e591f26d3530cf5fdc165a02eeb8d29290 /MdeModulePkg
parentde45e66b3450ee3e5f7e2298968a831cbb539b07 (diff)
downloadedk2-a84e7870ae3a84f21f7abb10dc5a62af4ca20b75.tar.gz
edk2-a84e7870ae3a84f21f7abb10dc5a62af4ca20b75.tar.bz2
edk2-a84e7870ae3a84f21f7abb10dc5a62af4ca20b75.zip
MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used
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> (cherry picked from commit 0f3cd8a92b036071892c827c59d23799ca31fef4)
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index 5be6bf386e..f0226eafa5 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -252,7 +252,7 @@ ValidateFmpCapsule (
//
if (Index > 0) {
if (ItemOffsetList[Index] <= ItemOffsetList[Index - 1]) {
- DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index, ItemOffsetList[Index - 1]));
+ DEBUG((DEBUG_ERROR, "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n", Index, ItemOffsetList[Index], Index - 1, ItemOffsetList[Index - 1]));
return EFI_INVALID_PARAMETER;
}
}