changeset 7244:e4851710d9a9

[gaim-migrate @ 7821] fix a potential segfault on some weird roster input committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 13 Oct 2003 00:11:23 +0000
parents 136daef154f6
children 747b9e00ef60
files src/protocols/jabber/roster.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;