Bug 21817

Summary: Sometimes crashes upon receiving an empty <nick/> update.
Product: Telepathy Reporter: Will Thompson <will>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: critical    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=shortlog;h=refs/heads/crash-on-no-pep-alias
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2009-05-19 09:40:09 UTC
I attempted to set my avatar, and for whatever reason Gabble sent a PEP nickname update to the server. In response, I received a pubsub event with a contentless <nick/> node:

<message from='jid redacted' to='jid redacted/Telepathy'><event xmlns='http://jabber.org/protocol/pubsub#event'><items node='http://jabber.org/protocol/nick'><item id='4DA4B02D620C9'> <nick xmlns='http://jabber.org/protocol/nick'/>
</item></items></event></message>

Gabble crashed, because it assumes that if there is a <nick/> node, then lm_message_node_get_value returns non-NULL, and passes NULL data with a non-NULL destroy callback to tp_handle_set_qdata(). I infer that Gabble had previously stored a non-NULL alias on the handle.
Comment 1 Will Thompson 2009-05-19 09:55:40 UTC
Fixed in the linked branch.
Comment 2 Guillaume Desmottes 2009-05-20 01:55:17 UTC
you can use elem(from_='bob@foo.com')

don't forget NEWS
Comment 3 Will Thompson 2009-05-20 02:02:30 UTC
(In reply to comment #2)
> you can use elem(from_='bob@foo.com')

Fixed.

> don't forget NEWS

I won't.
Comment 4 Will Thompson 2009-05-20 02:05:04 UTC
Merged, will be in telepathy-gabble 0.7.28.

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.