From 2cfcbcde2ecf0113c8ea50c392d680a279faf4fe Mon Sep 17 00:00:00 2001 From: Utkarsh Maurya Date: Sun, 13 Sep 2026 14:15:23 +0530 Subject: [PATCH] host/limine: Reject excess bios-install positional arguments Assisted-by: Codex:gpt-6-astra Signed-off-by: Utkarsh Maurya --- host/limine.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/host/limine.c b/host/limine.c index 4e1a420b..fe3dead9 100644 --- a/host/limine.c +++ b/host/limine.c @@ -1070,6 +1070,10 @@ static int bios_install(int argc, char *argv[]) { return EXIT_FAILURE; } else { if (device != NULL) { // [GPT partition index] + if (part_ndx != NULL) { + bios_install_usage(); + goto uninstall_mode_cleanup; + } part_ndx = argv[i]; // TODO: Make this non-positional? } else if ((device = fopen(argv[i], "r+b")) == NULL) { // perror_wrap("error: `%s`", argv[i]);