Mercurial > pidgin
comparison libpurple/protocols/jabber/roster.c @ 28293:c42d5c23a9e8
jabber: Don't crash when adding a buddy without a node (no '@'). Closes #10261.
Also add some assertions to jabber_chat_find so this doesn't cause a
crash in the future.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 24 Sep 2009 16:58:31 +0000 |
parents | 2e3678cd33a0 |
children | 5c61429ea529 |
comparison
equal
deleted
inserted
replaced
28292:fa77b70c8ca6 | 28293:c42d5c23a9e8 |
---|---|
352 /* TODO: Remove the buddy from the list? */ | 352 /* TODO: Remove the buddy from the list? */ |
353 return; | 353 return; |
354 } | 354 } |
355 | 355 |
356 /* Adding a chat room or a chat buddy to the roster is *not* supported. */ | 356 /* Adding a chat room or a chat buddy to the roster is *not* supported. */ |
357 if (jabber_chat_find(js, jid->node, jid->domain) != NULL) { | 357 if (jid->node && jabber_chat_find(js, jid->node, jid->domain) != NULL) { |
358 /* | 358 /* |
359 * This is the same thing Bonjour does. If it causes problems, move | 359 * This is the same thing Bonjour does. If it causes problems, move |
360 * it to an idle callback. | 360 * it to an idle callback. |
361 */ | 361 */ |
362 purple_debug_warning("jabber", "Cowardly refusing to add a MUC user " | 362 purple_debug_warning("jabber", "Cowardly refusing to add a MUC user " |