git: 4a676571e382 - main - stand: Pass in the proper size for bootinfo
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 17 Sep 2022 21:27:37 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=4a676571e382d0188b98134732f421df57a47a87
commit 4a676571e382d0188b98134732f421df57a47a87
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-09-17 21:15:51 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-09-17 21:18:29 +0000
stand: Pass in the proper size for bootinfo
Missed one sizeof(bi) -> sizeof(*bi) in 9758dd3de1cdd conversion to
allocating bootinfo.
Noticed by: tijl@
Fixes: 9758dd3de1cdd
Sponsored by: Netflix
---
stand/i386/libi386/bootinfo32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c
index 37a797289f2b..169d2dfb81f4 100644
--- a/stand/i386/libi386/bootinfo32.c
+++ b/stand/i386/libi386/bootinfo32.c
@@ -174,7 +174,7 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t
kernelname = getenv("kernelname");
i386_getdev(NULL, kernelname, &kernelpath);
bi->bi_version = BOOTINFO_VERSION;
- bi->bi_size = sizeof(bi);
+ bi->bi_size = sizeof(*bi);
bi->bi_memsizes_valid = 1;
bi->bi_basemem = bios_basemem / 1024;
bi->bi_extmem = bios_extmem / 1024;