Bug 54500 - connection-contact-list::prepare_contact_groups_cb crashes if a CM lacks Groups
Summary: connection-contact-list::prepare_contact_groups_cb crashes if a CM lacks Groups
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-09-04 17:28 UTC by Simon McVittie
Modified: 2013-09-24 15:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
TpConnection: don't crash if a broken CM has no Groups property (1.01 KB, patch)
2013-09-24 13:23 UTC, Simon McVittie
Details | Splinter Review

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.