Mercurial > pidgin.yaz
comparison src/protocols/jabber/roster.c @ 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 | 3a1b5a9b09c8 |
children | dd4b4a187171 |
comparison
equal
deleted
inserted
replaced
7243:136daef154f6 | 7244:e4851710d9a9 |
---|---|
150 name = xmlnode_get_attrib(item, "name"); | 150 name = xmlnode_get_attrib(item, "name"); |
151 ask = xmlnode_get_attrib(item, "ask"); | 151 ask = xmlnode_get_attrib(item, "ask"); |
152 | 152 |
153 jb = jabber_buddy_find(js, jid, TRUE); | 153 jb = jabber_buddy_find(js, jid, TRUE); |
154 | 154 |
155 if(!strcmp(subscription, "to")) | 155 if(!subscription) |
156 jb->subscription = JABBER_SUB_NONE; | |
157 else if(!strcmp(subscription, "to")) | |
156 jb->subscription = JABBER_SUB_TO; | 158 jb->subscription = JABBER_SUB_TO; |
157 else if(!strcmp(subscription, "from")) | 159 else if(!strcmp(subscription, "from")) |
158 jb->subscription = JABBER_SUB_FROM; | 160 jb->subscription = JABBER_SUB_FROM; |
159 else if(!strcmp(subscription, "both")) | 161 else if(!strcmp(subscription, "both")) |
160 jb->subscription = JABBER_SUB_BOTH; | 162 jb->subscription = JABBER_SUB_BOTH; |