From patchwork Fri Nov 9 09:23:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 197999 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DC9642C00DC for ; Fri, 9 Nov 2012 20:23:18 +1100 (EST) Received: from localhost ([::1]:60798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWko0-0001Ao-Cz for incoming@patchwork.ozlabs.org; Fri, 09 Nov 2012 04:23:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWknt-0001Ac-CS for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:23:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWknp-0006EX-Ax for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:23:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWknp-0006EG-2Y for qemu-devel@nongnu.org; Fri, 09 Nov 2012 04:23:05 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA99N4TX022228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Nov 2012 04:23:04 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-66.ams2.redhat.com [10.36.116.66]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA99N3oC002202; Fri, 9 Nov 2012 04:23:04 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 4799140246; Fri, 9 Nov 2012 10:23:03 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 9 Nov 2012 10:23:03 +0100 Message-Id: <1352452983-10569-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, Gerd Hoffmann Subject: [Qemu-devel] [PATCH v2] Fix piix4_pm savevm buffer overflow. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/acpi_piix4.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 15275cf..1fd6def 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -235,7 +235,7 @@ static int vmstate_acpi_post_load(void *opaque, int version_id) { \ .name = (stringify(_field)), \ .version_id = 0, \ - .num = GPE_LEN, \ + .num = 1, \ .info = &vmstate_info_uint16, \ .size = sizeof(uint16_t), \ .flags = VMS_ARRAY | VMS_POINTER, \ @@ -249,7 +249,9 @@ static const VMStateDescription vmstate_gpe = { .minimum_version_id_old = 1, .fields = (VMStateField []) { VMSTATE_GPE_ARRAY(sts, ACPIGPE), + VMSTATE_UNUSED(6), VMSTATE_GPE_ARRAY(en, ACPIGPE), + VMSTATE_UNUSED(6), VMSTATE_END_OF_LIST() } };