Mercurial > pidgin
comparison src/server.c @ 6578:1dc3eac729d1
[gaim-migrate @ 7100]
(20:21:09) Robot101: someone remove line 1097 and 1098 of server.c, and put the c = gaim_find_conversation two blocks down, after the existing (!b) conditional.
(20:21:20) LSchiere: what does that do?
(20:22:04) Robot101: fixes the null buddy dereferencing bug without duplicated check for (!b)
(20:22:21) LSchiere: what null buddy dereferencing bug?
(20:22:35) ***LSchiere goes to find the code in question
(20:22:39) Robot101: the one faceprint fixed on Thursday
(20:22:44) LSchiere: ah
(20:22:47) Robot101: by adding a check that was already there a few lines down
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Sat, 23 Aug 2003 00:23:51 +0000 |
| parents | 4c9e8867c45c |
| children | 9714538226f0 |
comparison
equal
deleted
inserted
replaced
| 6577:ea785d055825 | 6578:1dc3eac729d1 |
|---|---|
| 1090 GaimConversation *c; | 1090 GaimConversation *c; |
| 1091 struct buddy *b; | 1091 struct buddy *b; |
| 1092 GSList *buddies; | 1092 GSList *buddies; |
| 1093 | 1093 |
| 1094 account = gaim_connection_get_account(gc); | 1094 account = gaim_connection_get_account(gc); |
| 1095 b = gaim_find_buddy(account, name); | |
| 1096 | |
| 1097 if(!b) /* This shouldn't happen, but apparently does */ | |
| 1098 return; | |
| 1099 | 1095 |
| 1100 c = gaim_find_conversation(b->name); | 1096 c = gaim_find_conversation(b->name); |
| 1101 | 1097 |
| 1102 if (signon && (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->options & | 1098 if (signon && (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->options & |
| 1103 OPT_PROTO_CORRECT_TIME)) { | 1099 OPT_PROTO_CORRECT_TIME)) { |
| 1115 | 1111 |
| 1116 if (!b) { | 1112 if (!b) { |
| 1117 gaim_debug(GAIM_DEBUG_ERROR, "server", "No such buddy: %s\n", name); | 1113 gaim_debug(GAIM_DEBUG_ERROR, "server", "No such buddy: %s\n", name); |
| 1118 return; | 1114 return; |
| 1119 } | 1115 } |
| 1116 | |
| 1117 b = gaim_find_buddy(account, name); | |
| 1120 | 1118 |
| 1121 /* This code will 'align' the name from the TOC */ | 1119 /* This code will 'align' the name from the TOC */ |
| 1122 /* server with what's in our record. We want to */ | 1120 /* server with what's in our record. We want to */ |
| 1123 /* store things how THEY want it... */ | 1121 /* store things how THEY want it... */ |
| 1124 if (strcmp(name, b->name)) { | 1122 if (strcmp(name, b->name)) { |
