* [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used
@ 2018-04-16 8:41 Star Zeng
2018-04-16 8:43 ` Yao, Jiewen
0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-04-16 8:41 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Jiewen Yao
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>
---
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
index 36e8c26aa976..a5dcb76d5aaa 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
@@ -250,7 +250,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;
}
}
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used
2018-04-16 8:41 [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used Star Zeng
@ 2018-04-16 8:43 ` Yao, Jiewen
0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2018-04-16 8:43 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Zeng, Star
Reviewed-by: Jiewen.yao@intel.com
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Monday, April 16, 2018 4:42 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [edk2] [PATCH] 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>
> ---
> MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> index 36e8c26aa976..a5dcb76d5aaa 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> @@ -250,7 +250,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;
> }
> }
> --
> 2.7.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-16 8:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-16 8:41 [PATCH] MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used Star Zeng
2018-04-16 8:43 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox