sd-boot: Fix xbootldr detection

The broken crc32 calculation was a copy pasta error introduced in
87167331c9 and luckily has never been
shipped yet.
This commit is contained in:
Jan Janssen
2021-09-27 10:14:53 +02:00
committed by Lennart Poettering
parent bcbc3e81d3
commit 423523e063
2 changed files with 1 additions and 3 deletions

View File

@@ -1321,7 +1321,6 @@ static VOID config_entry_add_from_file(
assert(path);
assert(file);
assert(content);
assert(loaded_image_path);
entry = AllocatePool(sizeof(ConfigEntry));
@@ -1509,7 +1508,6 @@ static VOID config_load_entries(
assert(config);
assert(device);
assert(root_dir);
assert(loaded_image_path);
err = open_directory(root_dir, L"\\loader\\entries", &entries_dir);
if (EFI_ERROR(err))

View File

@@ -142,7 +142,7 @@ EFI_STATUS xbootldr_open(EFI_HANDLE *device, EFI_HANDLE *ret_device, EFI_FILE **
continue;
/* Calculate CRC of entries array, too */
r = BS->CalculateCrc32(&entries, sz, &crc32);
r = BS->CalculateCrc32(entries, sz, &crc32);
if (EFI_ERROR(r) || crc32 != h->PartitionEntryArrayCRC32)
continue;