multiboot2: Fix broken EFI memmap length calculation

This commit is contained in:
mintsuki 2022-09-15 22:31:50 +02:00
parent 50b524838a
commit e76c8d47a9
1 changed files with 1 additions and 1 deletions

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;