Mercurial > pidgin.yaz
changeset 1487:7bb7eca3fa14
[gaim-migrate @ 1497]
i thought i fixed this already. maybe that was yahoo. sigh.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 09 Feb 2001 03:44:06 +0000 |
parents | b72a33d07ce8 |
children | 55246babdeb3 |
files | plugins/icq/gaim_icq.c |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/icq/gaim_icq.c Fri Feb 09 01:53:32 2001 +0000 +++ b/plugins/icq/gaim_icq.c Fri Feb 09 03:44:06 2001 +0000 @@ -121,7 +121,8 @@ static void icq_msg_incoming(ICQLINK *link, unsigned long uin, unsigned char hour, unsigned char minute, unsigned char day, unsigned char month, unsigned short year, const char *data) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); - char buf[256], *tmp = g_strdup(data); + char buf[256], *tmp = g_malloc(BUF_LONG); + g_snprintf(tmp, BUF_LONG, "%s", data); g_snprintf(buf, sizeof buf, "%lu", uin); serv_got_im(gc, buf, tmp, 0); g_free(tmp); @@ -180,9 +181,8 @@ unsigned char minute, unsigned char day, unsigned char month, unsigned short year, const char *url, const char *descr) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); - int len = strlen(url) + strlen(descr) + 25; /* 25 is straight out of my ass */ - char *msg = g_malloc(len), buf[256]; - g_snprintf(msg, len, "<A HREF=\"%s\">%s</A>", url, descr); + char *msg = g_malloc(BUF_LONG), buf[256]; + g_snprintf(msg, BUF_LONG, "<A HREF=\"%s\">%s</A>", url, descr); g_snprintf(buf, 256, "%lu", uin); serv_got_im(gc, buf, msg, 0); g_free(msg); @@ -221,7 +221,8 @@ const char *email, const char *msg) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); char *who = g_strdup_printf("ICQ Web Pager: %s (%s)", nick, email); - char *what = g_strdup(msg); + char *what = g_malloc(BUF_LONG); + g_snprintf(what, BUF_LONG, "%s", msg); serv_got_im(gc, who, what, 0); g_free(who); g_free(what); @@ -232,7 +233,8 @@ const char *email, const char *msg) { struct gaim_connection *gc = find_gaim_conn_by_icq_link(link); char *who = g_strdup_printf("ICQ Mail Express: %s (%s)", nick, email); - char *what = g_strdup(msg); + char *what = g_malloc(BUF_LONG); + g_snprintf(what, BUF_LONG, "%s", msg); serv_got_im(gc, who, what, 0); g_free(who); g_free(what);