Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2023 21:28:49 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: facd0edbb26c - main - kboot: Fix an off by one error
Message-ID:  <202305012128.341LSnRw085894@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305012128.341LSnRw085894>