Patchwork [v2] Fix piix4_pm savevm buffer overflow.

login
register
mail settings
Submitter Gerd Hoffmann
Date Nov. 9, 2012, 9:23 a.m.
Message ID <1352452983-10569-1-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/197999/
State New
Headers show

Comments

Gerd Hoffmann - Nov. 9, 2012, 9:23 a.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/acpi_piix4.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

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()
     }
 };