[gaim-migrate @ 7821]

Mon, 13 Oct 2003 00:11:23 +0000

author
Nathan Walp <nwalp@pidgin.im>
date
Mon, 13 Oct 2003 00:11:23 +0000
changeset 7244
9ca1ebdc9213
parent 7243
7aab3ad945cb
child 7245
13f6e5bf0582

[gaim-migrate @ 7821]
fix a potential segfault on some weird roster input

src/protocols/jabber/roster.c file | annotate | diff | comparison | revisions
--- a/src/protocols/jabber/roster.c	Mon Oct 13 00:10:43 2003 +0000
+++ b/src/protocols/jabber/roster.c	Mon Oct 13 00:11:23 2003 +0000
@@ -152,7 +152,9 @@
 
 		jb = jabber_buddy_find(js, jid, TRUE);
 
-		if(!strcmp(subscription, "to"))
+		if(!subscription)
+			jb->subscription = JABBER_SUB_NONE;
+		else if(!strcmp(subscription, "to"))
 			jb->subscription = JABBER_SUB_TO;
 		else if(!strcmp(subscription, "from"))
 			jb->subscription = JABBER_SUB_FROM;

mercurial