[telepathy-gabble-0.16] telepathy-gabble: privacy lists: don' t crash on malformed replies

Will Thompson wjt at kemper.freedesktop.org
Thu Dec 6 08:28:51 PST 2012


Module: telepathy-gabble
Branch: telepathy-gabble-0.16
Commit: 3b10a7f1b0fcb728210eb12231df8b1a4c289c3b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=3b10a7f1b0fcb728210eb12231df8b1a4c289c3b

Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Tue Nov 27 18:40:06 2012 +0000

privacy lists: don't crash on malformed replies

---

 src/conn-presence.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conn-presence.c b/src/conn-presence.c
index 11c7d4f..cc19764 100644
--- a/src/conn-presence.c
+++ b/src/conn-presence.c
@@ -1287,10 +1287,10 @@ verify_invisible_privacy_list_cb (GabbleConnection *conn,
   if (query_node != NULL)
     list_node = wocky_node_get_child (query_node, "list");
 
-  if (!wocky_stanza_extract_errors (reply_msg, NULL, &error, NULL, NULL) &&
-      list_node != NULL)
+  if (!wocky_stanza_extract_errors (reply_msg, NULL, &error, NULL, NULL))
     {
-      if (!is_valid_invisible_list (list_node))
+      if (list_node == NULL ||
+          !is_valid_invisible_list (list_node))
         {
           g_free (priv->invisible_list_name);
           priv->invisible_list_name = g_strdup ("invisible-gabble");



More information about the telepathy-commits mailing list