diff options
author | Toomas Soome <tsoome@me.com> | 2017-04-28 00:46:42 +0300 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2017-05-02 17:52:22 +0200 |
commit | d9e07fb5ceddce0e538d5d84e2c3a99540e6d19d (patch) | |
tree | 5c51ce11633a15eae5b93dc2860518dbc84278c0 | |
parent | 503609a9497e27f206d815a06ce90a747d2ce573 (diff) | |
download | illumos-joyent-d9e07fb5ceddce0e538d5d84e2c3a99540e6d19d.tar.gz |
8119 loader: acpiv1 multiboot2 tag is set up with wrong size
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
-rw-r--r-- | usr/src/boot/sys/boot/common/multiboot2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/boot/sys/boot/common/multiboot2.c b/usr/src/boot/sys/boot/common/multiboot2.c index adf1b7e2b4..fa9775ea32 100644 --- a/usr/src/boot/sys/boot/common/multiboot2.c +++ b/usr/src/boot/sys/boot/common/multiboot2.c @@ -852,19 +852,19 @@ multiboot2_exec(struct preloaded_file *fp) if (rsdp != NULL) { multiboot_tag_new_acpi_t *ntag; multiboot_tag_old_acpi_t *otag; - int size; + uint32_t tsize; if (rsdp->Revision == 0) { - size = sizeof (*otag) + rsdp->Length; - otag = (multiboot_tag_old_acpi_t *)mb_malloc(size); + tsize = sizeof (*otag) + sizeof (ACPI_RSDP_COMMON); + otag = (multiboot_tag_old_acpi_t *)mb_malloc(tsize); otag->mb_type = MULTIBOOT_TAG_TYPE_ACPI_OLD; - otag->mb_size = size; + otag->mb_size = tsize; memcpy(otag->mb_rsdp, rsdp, sizeof (ACPI_RSDP_COMMON)); } else { - size = sizeof (*ntag) + rsdp->Length; - ntag = (multiboot_tag_new_acpi_t *)mb_malloc(size); + tsize = sizeof (*ntag) + rsdp->Length; + ntag = (multiboot_tag_new_acpi_t *)mb_malloc(tsize); ntag->mb_type = MULTIBOOT_TAG_TYPE_ACPI_NEW; - ntag->mb_size = size; + ntag->mb_size = tsize; memcpy(ntag->mb_rsdp, rsdp, rsdp->Length); } } |