Bug 54500

Summary: connection-contact-list::prepare_contact_groups_cb crashes if a CM lacks Groups
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-glibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: TpConnection: don't crash if a broken CM has no Groups property

Description Simon McVittie 2012-09-04 17:28:58 UTC
Starting at line 606 in telepathy-glib-0.18:

  groups = tp_asv_get_boxed (properties, "Groups", G_TYPE_STRV);
  for (iter = groups; *iter != NULL; iter++)
    {
      DEBUG ("  %s", *iter);
      g_ptr_array_add (self->priv->contact_groups, g_strdup (*iter));
    }

The second quoted line will crash if tp_asv_get_boxed() returns NULL, which will happen if the CM has no Groups property at all (i.e. is broken).
Comment 1 Simon McVittie 2013-09-12 18:54:54 UTC
(This might already be fixed?)
Comment 2 Simon McVittie 2013-09-24 13:23:36 UTC
Created attachment 86447 [details] [review]
TpConnection: don't crash if a broken CM has no Groups  property
Comment 3 Guillaume Desmottes 2013-09-24 13:26:35 UTC
Comment on attachment 86447 [details] [review]
TpConnection: don't crash if a broken CM has no Groups  property

Review of attachment 86447 [details] [review]:
-----------------------------------------------------------------

++
Comment 4 Simon McVittie 2013-09-24 15:18:25 UTC
Fixed in git for 0.21.2

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.