pidgin: 814dba6b: patch from darkrain42 that fixes a crash...

khc at pidgin.im khc at pidgin.im
Fri Nov 28 20:40:32 EST 2008


-----------------------------------------------------------------
Revision: 814dba6bc690168debf2736ede5e3f17dffa65ee
Ancestor: 9654fbb42d0733387232427d4589f92c4a7d0846
Author: khc at pidgin.im
Date: 2008-11-29T01:35:02
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/814dba6bc690168debf2736ede5e3f17dffa65ee

Modified files:
        libpurple/protocols/jabber/presence.c

ChangeLog: 

patch from darkrain42 that fixes a crash with a broken server, we probably
should have an util function that does string equality check but doesn't
crash on NULL. Too bad g_str_equal doesn't do that

Fixes #6972

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c	66ab4ba4cf20586cdf0a054268387864947bb98a
+++ libpurple/protocols/jabber/presence.c	ebb63e249f0ece723d0f1b7053b35eee7022a6fa
@@ -513,7 +513,7 @@ void jabber_presence_parse(JabberStream 
 		} else if(!strcmp(y->name, "delay") && !strcmp(xmlns, "urn:xmpp:delay")) {
 			/* XXX: compare the time.  jabber:x:delay can happen on presence packets that aren't really and truly delayed */
 			delayed = TRUE;
-		} else if(!strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) {
+		} else if(xmlns && !strcmp(y->name, "c") && !strcmp(xmlns, "http://jabber.org/protocol/caps")) {
 			caps = y; /* store for later, when creating buddy resource */
 		} else if(!strcmp(y->name, "x")) {
 			const char *xmlns = xmlnode_get_namespace(y);


More information about the Commits mailing list