]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: Fix xbootldr detection
authorJan Janssen <medhefgo@web.de>
Mon, 27 Sep 2021 08:14:53 +0000 (10:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Oct 2021 07:54:04 +0000 (09:54 +0200)
The broken crc32 calculation was a copy pasta error introduced in
87167331c902e89bea626c311f0d751ffbc95d73 and luckily has never been
shipped yet.

src/boot/efi/boot.c
src/boot/efi/xbootldr.c

index e073217f31a65ca973b32cf7d265d08d1e054902..a9ef1f351091fac477c5981c5a602a0210c35e2d 100644 (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))
index 5ae2053496eb112b6751131b4c6d8720510f0037..7ee4ed6f266b463428ad1f002f7dcbce417945f3 100644 (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;