qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 08/27] qom: fix off-by-one


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH v2 08/27] qom: fix off-by-one
Date: Sat, 4 Feb 2012 09:02:38 +0100

Signed-off-by: Paolo Bonzini <address@hidden>
---
 qom/object.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index b26272f..314fc7a 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -871,7 +871,7 @@ static void object_set_link_property(Object *obj, Visitor 
*v, void *opaque,
             gchar *target_type;
 
             target_type = g_strdup(&type[5]);
-            target_type[strlen(target_type) - 2] = 0;
+            *strchr(target_type, '>') = 0;
 
             if (object_dynamic_cast(target, target_type)) {
                 object_ref(target);
-- 
1.7.7.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]