host/limine: Ensure GPT BIOS partition is at least 32KiB
diff --git a/host/limine.c b/host/limine.c
index 94900051..36fd97db 100644
--- a/host/limine.c
+++ b/host/limine.c
@@ -1088,6 +1088,11 @@ part_too_low:
goto cleanup;
}
+ if (((ENDSWAP(gpt_entry.ending_lba) - ENDSWAP(gpt_entry.starting_lba)) + 1) * lb_size < 32768) {
+ fprintf(stderr, "%s: error: Partition with index `%s` is smaller than 32KiB.\n", program_name, part_ndx);
+ goto cleanup;
+ }
+
if (!quiet) {
fprintf(stderr, "GPT partition specified. Installing there instead of embedding.\n");
}
