diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2024-10-03 00:02:55 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-10-09 02:13:56 +0000 |
commit | 06da7daab1eb129a1bf3eb93ed74c102d1587071 (patch) | |
tree | 03731546ddadae0597a8d3855b8df291e0395e0a | |
parent | 550c38a29961ab1c9cc4f9a17cdd3346566c4bef (diff) | |
download | edk2-06da7daab1eb129a1bf3eb93ed74c102d1587071.tar.gz edk2-06da7daab1eb129a1bf3eb93ed74c102d1587071.tar.bz2 edk2-06da7daab1eb129a1bf3eb93ed74c102d1587071.zip |
FmpDevicePkg/FmpDependencyLib: Fix potential overflow in loop
FmpVersionsCount is a UINTN while the loop index variable compared
against it is a UINT8. This can lead to an overflow of the loop
index for FmpVersionsCount values larger than UINT8_MAX. This change
makes Index a UINTN to match in width.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
-rw-r--r-- | FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c b/FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c index 50662e74e0..11ee83d3ea 100644 --- a/FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c +++ b/FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.c @@ -228,7 +228,7 @@ EvaluateDependency ( {
EFI_STATUS Status;
UINT8 *Iterator;
- UINT8 Index;
+ UINTN Index;
DEPEX_ELEMENT Element1;
DEPEX_ELEMENT Element2;
GUID ImageTypeId;
|