From 6c6409c01aeeec60ee88eecbf9efa4aa8b0629f0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 14 Sep 2010 10:36:55 +0200 Subject: tp_chat_group_members_changed_cb: early return if removed or added have not the expected length (#629549) --- libempathy/empathy-tp-chat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libempathy/empathy-tp-chat.c') diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 6f4874fc8..375683b62 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -1119,8 +1119,11 @@ tp_chat_group_members_changed_cb (TpChannel *self, /* Contact renamed */ if (reason == TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED) { /* there can only be a single 'added' and a single 'removed' handle */ - g_warn_if_fail (removed->len == 1); - g_warn_if_fail (added->len == 1); + if (removed->len != 1 || added->len != 1) { + g_warning ("RENAMED with %u added, %u removed (expected 1, 1)", + added->len, removed->len); + return; + } old_handle = g_array_index (removed, guint, 0); -- cgit v1.2.3