Mercurial > pidgin.yaz
comparison src/server.c @ 12894:7dc00a9dfba5
[gaim-migrate @ 15247]
serv_got_chat_in will segfault on a NULL message, so let's make it check for NULL before calling strlen
committer: Tailor Script <tailor@pidgin.im>
| author | Christopher O'Brien <siege@pidgin.im> |
|---|---|
| date | Mon, 16 Jan 2006 16:35:00 +0000 |
| parents | c0fbdea8828b |
| children | 9a5b9680aaeb |
comparison
equal
deleted
inserted
replaced
| 12893:31e3c4f78aa4 | 12894:7dc00a9dfba5 |
|---|---|
| 778 GaimConvChat *chat = NULL; | 778 GaimConvChat *chat = NULL; |
| 779 char *buf; | 779 char *buf; |
| 780 char *buffy, *angel; | 780 char *buffy, *angel; |
| 781 int plugin_return; | 781 int plugin_return; |
| 782 | 782 |
| 783 g_return_if_fail(who != NULL); | |
| 784 g_return_if_fail(message != NULL); | |
| 785 | |
| 783 for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) { | 786 for (bcs = g->buddy_chats; bcs != NULL; bcs = bcs->next) { |
| 784 conv = (GaimConversation *)bcs->data; | 787 conv = (GaimConversation *)bcs->data; |
| 785 | 788 |
| 786 chat = GAIM_CONV_CHAT(conv); | 789 chat = GAIM_CONV_CHAT(conv); |
| 787 | 790 |
| 810 gaim_signal_emit_return_1(gaim_conversations_get_handle(), | 813 gaim_signal_emit_return_1(gaim_conversations_get_handle(), |
| 811 "receiving-chat-msg", g->account, | 814 "receiving-chat-msg", g->account, |
| 812 &angel, &buffy, conv, &flags)); | 815 &angel, &buffy, conv, &flags)); |
| 813 | 816 |
| 814 if (!buffy || !angel || plugin_return) { | 817 if (!buffy || !angel || plugin_return) { |
| 815 if (buffy) | 818 g_free(buffy); |
| 816 g_free(buffy); | 819 g_free(angel); |
| 817 if (angel) | |
| 818 g_free(angel); | |
| 819 return; | 820 return; |
| 820 } | 821 } |
| 821 who = angel; | 822 who = angel; |
| 822 message = buffy; | 823 message = buffy; |
| 823 | 824 |
