Mercurial > pidgin.yaz
changeset 3020:c3a29bd2a2d7
[gaim-migrate @ 3033]
Fixes a segfault in Yahoo, and a disconnection error in MSN.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 07 Mar 2002 18:53:37 +0000 |
parents | 304e8c376472 |
children | 18f0e61a6caf |
files | src/protocols/msn/msn.c src/protocols/yahoo/yahoo.c |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Thu Mar 07 07:26:12 2002 +0000 +++ b/src/protocols/msn/msn.c Thu Mar 07 18:53:37 2002 +0000 @@ -1813,6 +1813,11 @@ struct msn_data *md = gc->proto_data; char buf[MSN_BUF_LEN]; + if (strlen(url_encode(entry)) > 387) { + do_error_dialog("Friendly name too long.", "MSN Error"); + return; + } + g_snprintf(buf, sizeof(buf), "REA %d %s %s\r\n", ++md->trId, gc->username, url_encode(entry)); if (msn_write(md->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error");
--- a/src/protocols/yahoo/yahoo.c Thu Mar 07 07:26:12 2002 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Mar 07 18:53:37 2002 +0000 @@ -496,7 +496,7 @@ } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { struct buddy *bud = find_buddy(gc, from); void *free1=NULL, *free2=NULL; - if (!bud) + if (!bud) debug_printf("%s is playing a game, and doesn't want you to know.\n"); if (*stat == '1') { if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { @@ -504,14 +504,16 @@ g_free(free2); } g_hash_table_insert (yd->games, g_strdup(from), g_strdup(game)); - serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); + if (bud) + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); } else { if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { g_free(free1); g_free(free2); g_hash_table_remove (yd->games, from); } - serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); + if (bud) + serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); } } }