From facd0edbb26cec53e8b958f426b7f46550db6c5f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 1 May 2023 15:12:24 -0600 Subject: [PATCH] kboot: Fix an off by one error Fix an off-by-one error that would mean we'd get stuck on the newline if ACPI= wasn't first. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39817 --- stand/kboot/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index 3895f7e76773..ecf96cc73d4d 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -168,7 +168,7 @@ kboot_rsdp_from_efi(void) return((vm_offset_t)strtoull(walker + 7, NULL, 0)); if (strncmp("ACPI=", walker, 5) == 0) return((vm_offset_t)strtoull(walker + 5, NULL, 0)); - walker += strcspn(walker, "\n"); + walker += strcspn(walker, "\n") + 1; } return (0); }