Commit 664ee768 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Fam Zheng
Browse files

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: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20160928143810.25558-1-marcandre.lureau@redhat.com>
Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
[Warp the long error message line in commit message. - Fam]
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
parent 84d0984d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);