e2a042f066
Fix CVE-2013-4148 (bnc#864812), CVE-2013-4149 (bnc#864649), CVE-2013-4150 (bnc#864650), CVE-2013-4151 (bnc#864653), CVE-2013-4526 (bnc#864671), CVE-2013-4527 (bnc#864673), CVE-2013-4529 (bnc#864678), CVE-2013-4530 (bnc#864682), CVE-2013-4531 (bnc#864796), CVE-2013-4533 (bnc#864655), CVE-2013-4534 (bnc#864811), CVE-2013-4535 / CVE-2013-4536 (bnc#864665), CVE-2013-4537 (bnc#864391), CVE-2013-4538 (bnc#864769), CVE-2013-4539 (bnc#864805), CVE-2013-4540 (bnc#864801), CVE-2013-4541 (bnc#864802), CVE-2013-4542 (bnc#864804), CVE-2013-6399 (bnc#864814), CVE-2014-0182 (bnc#874788) OBS-URL: https://build.opensuse.org/request/show/235280 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=211
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From e258560116c8413cd5c52af69ab73dc82142dae9 Mon Sep 17 00:00:00 2001
|
|
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
Date: Thu, 3 Apr 2014 19:50:35 +0300
|
|
Subject: [PATCH] vmstate: add VMSTATE_VALIDATE
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Validate state using VMS_ARRAY with num = 0 and VMS_MUST_EXIST
|
|
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
(cherry picked from commit 4082f0889ba04678fc14816c53e1b9251ea9207e)
|
|
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
|
---
|
|
include/migration/vmstate.h | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
|
|
index de970ab..5b71370 100644
|
|
--- a/include/migration/vmstate.h
|
|
+++ b/include/migration/vmstate.h
|
|
@@ -204,6 +204,14 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|
.offset = vmstate_offset_value(_state, _field, _type), \
|
|
}
|
|
|
|
+/* Validate state using a boolean predicate. */
|
|
+#define VMSTATE_VALIDATE(_name, _test) { \
|
|
+ .name = (_name), \
|
|
+ .field_exists = (_test), \
|
|
+ .flags = VMS_ARRAY | VMS_MUST_EXIST, \
|
|
+ .num = 0, /* 0 elements: no data, only run _test */ \
|
|
+}
|
|
+
|
|
#define VMSTATE_POINTER(_field, _state, _version, _info, _type) { \
|
|
.name = (stringify(_field)), \
|
|
.version_id = (_version), \
|