Bug 43584

Summary: Wocky dataforms serialization segfault
Product: Wocky Reporter: Alban Crequy <alban.crequy>
Component: GeneralAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://cgit.collabora.com/git/user/alban/wocky/log/?h=dataform
Whiteboard: review+
i915 platform: i915 features:

Description Alban Crequy 2011-12-07 09:16:01 UTC
Function add_field_to_node_using_default() can segfault with the following code:

  form = g_object_new (WOCKY_TYPE_DATA_FORM, NULL);
  wocky_data_form_set_string (form, "field", "value", TRUE);
  wocky_data_form_add_to_node (form, ...);

field->raw_value_contents is not initialized because the field does not come from a WockyNode.

The following patches fix the crash.
Comment 1 Jonny Lamb 2011-12-13 02:12:41 UTC
I re-ordered the top two patches so the test comes after the fix (in an attempt to not break bisecting); then pushed the commits upstream.

Thanks for the patches!
Comment 2 Alban Crequy 2012-01-04 05:25:53 UTC
For the record, this fix is included in telepathy-gabble 0.15.4.
Comment 3 Alban Crequy 2012-01-04 05:27:12 UTC
(In reply to comment #2)
> For the record, this fix is included in telepathy-gabble 0.15.4.

Sorry, I meant telepathy-gabble 0.15.3.

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.