OcAppleBootPolicyLib: Fix Apple UB

This commit is contained in:
Download-Fritz 2020-05-06 20:55:41 +02:00
parent 971e412a5c
commit 3d97abb86f

View File

@ -1344,7 +1344,6 @@ OcBootPolicyGetAllApfsRecoveryFilePath (
EFI_HANDLE *HandleBuffer;
APFS_VOLUME_INFO *VolumeInfo;
GUID *ContainerGuids;
EFI_GUID ContainerGuid;
UINTN NumberOfContainers;
UINTN NumberOfVolumeInfos;
UINTN Index;
@ -1417,7 +1416,7 @@ OcBootPolicyGetAllApfsRecoveryFilePath (
GuidPresent = FALSE;
for (Index2 = 0; Index2 < NumberOfContainers; ++Index2) {
if (CompareGuid (&ContainerGuids[Index2], &ContainerGuid)) {
if (CompareGuid (&ContainerGuids[Index2], &VolumeInfo[NumberOfVolumeInfos].ContainerGuid)) {
GuidPresent = TRUE;
break;
}