host/limine: Fix off-by-one in --uninstall-data-file parsing

This commit is contained in:
Mintsuki 2026-01-11 23:54:48 +01:00
parent f51af818ed
commit 377d9abbbb
No known key found for this signature in database
GPG Key ID: 1F3C021BECA23821

View File

@ -693,11 +693,11 @@ static int bios_install(int argc, char *argv[]) {
fprintf(stderr, "warning: --uninstall already set.\n");
}
uninstall_mode = true;
} else if (memcmp(argv[i], "--uninstall-data-file=", 21) == 0) {
} else if (memcmp(argv[i], "--uninstall-data-file=", 22) == 0) {
if (uninstall_file != NULL && !quiet) {
fprintf(stderr, "warning: --uninstall-data-file already set. Overriding...\n");
}
uninstall_file = argv[i] + 21;
uninstall_file = argv[i] + 22;
if (strlen(uninstall_file) == 0) {
fprintf(stderr, "error: Uninstall data file has a zero-length name!\n");
return EXIT_FAILURE;