diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c index 6ee36afcb881..4d7b2713685d 100644 --- a/stand/efi/loader/arch/amd64/multiboot2.c +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -107,7 +107,7 @@ loadfile(char *filename, uint64_t dest, struct preloaded_file **result) break; } - if (i >= MULTIBOOT_SEARCH) { + if (i >= search_size) { error = EFTYPE; goto out; }