aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2023-05-01 21:12:24 +0000
committerWarner Losh <imp@FreeBSD.org>2023-05-01 21:12:24 +0000
commitfacd0edbb26cec53e8b958f426b7f46550db6c5f (patch)
treeeb1b78a50ba7c678be557aea43c7f2443cd1b2ac
parentcf6044857e2b20f2ecf90929027e9dd335b38803 (diff)
downloadsrc-facd0edbb26cec53e8b958f426b7f46550db6c5f.tar.gz
src-facd0edbb26cec53e8b958f426b7f46550db6c5f.zip
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
-rw-r--r--stand/kboot/main.c2
1 files changed, 1 insertions, 1 deletions
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);
}