From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rtaac-0001g6-1m for qemu-devel@nongnu.org; Sat, 04 Feb 2012 03:03:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtaaV-0005CG-8U for qemu-devel@nongnu.org; Sat, 04 Feb 2012 03:03:17 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:45017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtaaV-00057i-0Z for qemu-devel@nongnu.org; Sat, 04 Feb 2012 03:03:11 -0500 Received: by mail-we0-f173.google.com with SMTP id h12so3839010wer.4 for ; Sat, 04 Feb 2012 00:03:10 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sat, 4 Feb 2012 09:02:38 +0100 Message-Id: <1328342577-25732-9-git-send-email-pbonzini@redhat.com> In-Reply-To: <1328342577-25732-1-git-send-email-pbonzini@redhat.com> References: <1328342577-25732-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 08/27] qom: fix off-by-one List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini --- 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