diff options
author | Melody Olvera <molvera@codeaurora.org> | 2021-07-16 16:02:39 -0700 |
---|---|---|
committer | Melody Olvera <molvera@codeaurora.org> | 2021-07-19 10:21:17 -0700 |
commit | abe1fb5e334c747e62fdf656fa53cfef9729feca (patch) | |
tree | 5461f950b787e8e28e18afba9559b45482298805 | |
parent | 819cece6d50dea3bdd97f4f1523bd793634a129f (diff) |
QcomModulePkg: Remove MIN check from GetPartitionIndex
Taking the minimum length of the partition name strings is causing
attempts to find partition names to match when they should not.
Remove this check to make sure that the whole name is checked.
Change-Id: Ib356cad72d7ebd9cb138f055ba63ddd448be4cc6
Signed-off-by: Melody Olvera <molvera@codeaurora.org>
-rwxr-xr-x | QcomModulePkg/Library/BootLib/PartitionTableUpdate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c b/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c index e5ee225fd8..fafe166c68 100755 --- a/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c +++ b/QcomModulePkg/Library/BootLib/PartitionTableUpdate.c @@ -142,8 +142,7 @@ GetPartitionIndex (CHAR16 *Pname) for (i = 0; i < PartitionCount; i++) { if (!StrnCmp (PtnEntries[i].PartEntry.PartitionName, Pname, - MIN (ARRAY_SIZE (PtnEntries[i].PartEntry.PartitionName), - StrLen (Pname)))) { + ARRAY_SIZE (PtnEntries[i].PartEntry.PartitionName))) { return i; } } |