multiboot2: Fix broken EFI memmap length calculation

This commit is contained in:
mintsuki 2022-09-15 22:31:50 +02:00
parent 98c9b4ea2d
commit 8773c36ab6

View File

@ -745,7 +745,7 @@ noreturn void multiboot2_load(char *config, char* cmdline) {
}
// Create the EFI memory map tag.
uint32_t size = sizeof(struct multiboot_tag_efi_mmap) * efi_mmap_size;
uint32_t size = sizeof(struct multiboot_tag_efi_mmap) + efi_mmap_size;
struct multiboot_tag_efi_mmap *mmap_tag = (struct multiboot_tag_efi_mmap *)(mb2_info + info_idx);
mmap_tag->type = MULTIBOOT_TAG_TYPE_EFI_MMAP;