pidgin: 269c9bb0: Fix a crash when <NICKNAME/> is present ..
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu May 21 00:55:36 EDT 2009
-----------------------------------------------------------------
Revision: 269c9bb016ef464d143d1bbd66dca0fa03030aa3
Ancestor: 1696adf9dd410d4b67f782058165fbf61cb53c61
Author: darkrain42 at pidgin.im
Date: 2009-05-20T15:59:04
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/269c9bb016ef464d143d1bbd66dca0fa03030aa3
Modified files:
libpurple/protocols/jabber/presence.c
ChangeLog:
Fix a crash when <NICKNAME/> is present in a vcard, but has no data.
Fixes MacinEnterprise's crash on Adium#12053 (unrelated to the rest of the ticket).
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c 01b74c2bdc3e885a6fede21fff8cb212afb4f1e4
+++ libpurple/protocols/jabber/presence.c 334811d3e705f4cb261d14e0fef4729971c3ba9e
@@ -361,10 +361,10 @@ jabber_vcard_parse_avatar(JabberStream *
if ((nick = xmlnode_get_child(vcard, "NICKNAME"))) {
char *tmp = xmlnode_get_data(nick);
char *bare_jid = jabber_get_bare_jid(from);
- if (strstr(bare_jid, tmp) == NULL) {
+ if (tmp && strstr(bare_jid, tmp) == NULL) {
g_free(nickname);
nickname = tmp;
- } else
+ } else if (tmp)
g_free(tmp);
g_free(bare_jid);
More information about the Commits
mailing list