git: facd0edbb26c - main - kboot: Fix an off by one error

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 01 May 2023 21:28:49 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=facd0edbb26cec53e8b958f426b7f46550db6c5f

commit facd0edbb26cec53e8b958f426b7f46550db6c5f
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-05-01 21:12:24 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-05-01 21:12:24 +0000

    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);
 }