Bug 24654

Summary: _tp_account_check_features can use uninitialized variables
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-glibAssignee: David Laban <alsuren>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: blocker    
Priority: high CC: guillaume.desmottes
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 24209    

Description Simon McVittie 2009-10-21 05:19:41 UTC
Daf pasted:

==26952== Conditional jump or move depends on uninitialised value(s)
==26952==    at 0x42F1B2E: _tp_account_check_features (account.c:257)
==26952==    by 0x42F21D0: _tp_account_update (account.c:307)
==26952==    by 0x43736A8: _tp_cli_dbus_properties_invoke_callback_get_all (tp-cli-generic-body.h:1421)
==26952==    by 0x4375E66: tp_proxy_pending_call_idle_invoke (proxy-methods.c:153)
==26952==    by 0x5C330B0: g_idle_dispatch (gmain.c:4065)
==26952==    by 0x5C34E97: g_main_context_dispatch (gmain.c:1960)
==26952==    by 0x5C38622: g_main_context_iterate (gmain.c:2591)
==26952==    by 0x5C38AE9: g_main_loop_run (gmain.c:2799)
==26952==    by 0x55D1ED8: gtk_main (gtkmain.c:1216)
==26952==    by 0x8066D36: main (empathy.c:1002)
==26952== 
==26952== Conditional jump or move depends on uninitialised value(s)
==26952==    at 0x42F1B12: _tp_account_check_features (account.c:228)
==26952==    by 0x42F21D0: _tp_account_update (account.c:307)
==26952==    by 0x43736A8: _tp_cli_dbus_properties_invoke_callback_get_all (tp-cli-generic-body.h:1421)
==26952==    by 0x4375E66: tp_proxy_pending_call_idle_invoke (proxy-methods.c:153)
==26952==    by 0x5C330B0: g_idle_dispatch (gmain.c:4065)
==26952==    by 0x5C34E97: g_main_context_dispatch (gmain.c:1960)
==26952==    by 0x5C38622: g_main_context_iterate (gmain.c:2591)
==26952==    by 0x5C38AE9: g_main_loop_run (gmain.c:2799)
==26952==    by 0x55D1ED8: gtk_main (gtkmain.c:1216)
==26952==    by 0x8066D36: main (empathy.c:1002)
Comment 1 Simon McVittie 2009-11-13 05:20:24 UTC
*** Bug 24869 has been marked as a duplicate of this bug. ***
Comment 2 Simon McVittie 2009-11-13 05:21:11 UTC
The duplicate bug might also be a good source of information.
Comment 3 Simon McVittie 2009-11-16 05:50:15 UTC
tp_account_prepare_async does not copy its @features argument. It should; this would probably fix this bug?
Comment 4 David Laban 2009-11-16 19:18:15 UTC
It does indeed seem to fix the bug. Initial efforts are to be found in [1], but the fix should probably also be applied to TpAccountManager and rebased to master (where there is another place it might need to be freed).

I really don't like copy-pasted code, but most of my code in AccountManager recently seems to be copy-pasted from Account. Should I be refactoring out the features code now, or waiting until someone has an implementation of the non-trivial case?

[1] http://git.collabora.co.uk/?p=user/alsuren/telepathy-glib.git;a=shortlog;h=refs/heads/fix-24654
Comment 5 David Laban 2009-11-23 02:12:32 UTC
Fix merged to master.

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.