diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2018-03-19 19:56:35 -0700 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-03-22 12:44:08 +0800 |
commit | 0a93e457f7b8669e6325aeed832c95e3af829a34 (patch) | |
tree | ea743755437586b90e054d1f82e48700da9fa12b | |
parent | 2e8ea3f20bedfe09b32dbf17b29c561391b6dcae (diff) | |
download | edk2-0a93e457f7b8669e6325aeed832c95e3af829a34.tar.gz |
MdeModulePkg/CapsuleApp: Fix logic bug in CleanGatherList()
https://bugzilla.tianocore.org/show_bug.cgi?id=905
Fix pointer math when more than one capsule is passed
to the CapsuleApp. Use the ContinuationPointer from
the last array entry instead of the first array entry.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
(cherry picked from commit 845f7cfef2d61f31adc4fbd94bf51ce459785e6b)
-rw-r--r-- | MdeModulePkg/Application/CapsuleApp/CapsuleApp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c index 393cfe5060..b9ff812179 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c @@ -1,7 +1,7 @@ /** @file
A shell application that triggers capsule update process.
- Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -653,7 +653,7 @@ CleanGatherList ( break;
}
- TempBlockPtr2 = (VOID *) ((UINTN) TempBlockPtr->Union.ContinuationPointer);
+ TempBlockPtr2 = (VOID *) ((UINTN) TempBlockPtr[Index].Union.ContinuationPointer);
FreePool(TempBlockPtr1);
TempBlockPtr1 = TempBlockPtr2;
}
|