diff options
| author | John Polstra <jdp@FreeBSD.org> | 2004-05-14 01:29:21 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 2004-05-14 01:29:21 +0000 |
| commit | 15a3ddef19dfbbff023d10ad4282bd0e7900fb61 (patch) | |
| tree | 74e67d256ab5ee650533444f56004ab0d0344c49 | |
| parent | fc0c46e313cbae84db085ce02c50a1cb2de3828c (diff) | |
Notes
| -rw-r--r-- | sys/boot/i386/libi386/biosacpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/i386/libi386/biosacpi.c b/sys/boot/i386/libi386/biosacpi.c index b4080bdc39a7..c8ee1c7c46d1 100644 --- a/sys/boot/i386/libi386/biosacpi.c +++ b/sys/boot/i386/libi386/biosacpi.c @@ -66,8 +66,8 @@ biosacpi_detect(void) revision = 1; sprintf(buf, "%d", revision); setenv("hint.acpi.0.revision", buf, 1); - sprintf(buf, "%6s", rsdp->OemId); - buf[6] = '\0'; + strncpy(buf, rsdp->OemId, sizeof(rsdp->OemId)); + buf[sizeof(rsdp->OemId)] = '\0'; setenv("hint.acpi.0.oem", buf, 1); sprintf(buf, "0x%08x", rsdp->RsdtPhysicalAddress); setenv("hint.acpi.0.rsdt", buf, 1); |
