diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-09-28 18:38:10 +0400 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2016-09-29 11:43:22 +0800 |
commit | 664ee76891adce2b1df42d714f4c158a1df4220b (patch) | |
tree | af6d1d6c57c80bcf1bc108042b2e5f039b3543ac /hw | |
parent | 84d0984dfe336f24109a6792d06aad0e9ae5e0a6 (diff) |
smbios: fix uuid copy
Since 9c5ce8db, the uuid is wrongly copied, as QemuUUID 'in' argument is
already a pointer.
Fixes ASAN complaining:
hw/smbios/smbios.c:489:5: runtime error: load of address 0x7fffcdb91b00
with insufficient space for an object of type '__int128 unsigned'
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20160928143810.25558-1-marcandre.lureau@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[Warp the long error message line in commit message. - Fam]
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/smbios/smbios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 9a6552aa60..3a96cededd 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -486,7 +486,7 @@ static void smbios_build_type_0_table(void) */ static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { - memcpy(uuid, &in, 16); + memcpy(uuid, in, 16); if (smbios_uuid_encoded) { uuid->time_low = bswap32(uuid->time_low); uuid->time_mid = bswap16(uuid->time_mid); |