Received: from eggs.gnu.org ([2001:4830:134:3::10]:34787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqVwr-0000Sp-G3 for qemu-devel@nongnu.org; Sat, 01 Oct 2016 21:52:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqVwp-0002wd-It for qemu-devel@nongnu.org; Sat, 01 Oct 2016 21:52:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqVwp-0002wT-CG for qemu-devel@nongnu.org; Sat, 01 Oct 2016 21:52:11 -0400 From: Fam Zheng Date: Sun, 2 Oct 2016 09:52:02 +0800 Message-Id: <1475373123-15058-3-git-send-email-famz@redhat.com> In-Reply-To: <1475373123-15058-1-git-send-email-famz@redhat.com> References: <1475373123-15058-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 2/3] smbios: fix uuid copy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell From: Marc-Andr=C3=A9 Lureau 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=C3=A9 Lureau Message-Id: <20160928143810.25558-1-marcandre.lureau@redhat.com> Reviewed-by: Laszlo Ersek [Warp the long error message line in commit message. - Fam] Signed-off-by: Fam Zheng --- hw/smbios/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 9a6552a..3a96ced 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 =3D bswap32(uuid->time_low); uuid->time_mid =3D bswap16(uuid->time_mid); --=20 2.7.4