aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-06-03 17:10:36 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-06-03 17:10:36 +0100
commit19176513584bf26fa69a8a946982d9c521038a17 (patch)
tree4dec5cdb3cc59662e9b7fa67f0037b4424b6e405
parent9e768da723b4a770967efa0d4dcaf58ccef8917f (diff)
Fixed a bug that caused crashes when joining certain kinds of Google Talk
chatrooms. Doesn't seem to be Google Talk specific, other than that this is the first time I see empty <x xmlns="http://jabber.org/protocol/muc#user"/> elements that cause this crash. A more proper/efficient fix may be to just move the break outside the inner if.
-rw-r--r--protocols/jabber/conference.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index 480006bd..08bef4f5 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -233,8 +233,10 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu
if( ( s = xt_find_attr( c, "xmlns" ) ) &&
( strcmp( s, XMLNS_MUC_USER ) == 0 ) )
{
- c = xt_find_node( c->children, "item" );
- if( ( s = xt_find_attr( c, "jid" ) ) )
+ struct xt_node *item;
+
+ item = xt_find_node( c->children, "item" );
+ if( ( s = xt_find_attr( item, "jid" ) ) )
{
/* Yay, found what we need. :-) */
bud->ext_jid = jabber_normalize( s );