Skip to content

host/limine: Reject excess bios-install positional arguments - #660

Open
pro-utkarshM wants to merge 1 commit into
Limine-Bootloader:trunkfrom
pro-utkarshM:fix/bios-install-extra-arguments
Open

pro-utkarshM wants to merge 1 commit into
Limine-Bootloader:trunkfrom
pro-utkarshM:fix/bios-install-extra-arguments

Conversation

@pro-utkarshM

Copy link
Copy Markdown

bios-install disk.img 1 2 silently replaces the first partition index with the second and can install into the wrong GPT partition. Reject a second index operand before device initialization, using the existing cleanup path to close the opened device.

Validation: all 14 MBR/GPT regression cases pass. Nine malformed invocations, including interspersed options and quiet mode, now fail without changing the image; five valid controls preserve autodetection and explicit partition selection. The standalone regression is in the linked issue. The C99 host build and full LLVM build (./bootstrap, ./configure --enable-werror --enable-all, make all) passed with warnings treated as errors.

Fixes #659.

Assisted-by: Codex:gpt-6-astra
Signed-off-by: Utkarsh Maurya <projects.utkarshMaurya@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant