# HG changeset patch # User Eric Warmenhoven # Date 997297981 0 # Node ID 73253b36c3cb88ffdd4d11873dcebd9d43be28fd # Parent 1779daad8cc32f57814230d8407a581f170f2814 [gaim-migrate @ 2146] i wonder if this will help anything. committer: Tailor Script diff -r 1779daad8cc3 -r 73253b36c3cb src/protocols/toc/toc.c --- a/src/protocols/toc/toc.c Wed Aug 08 17:34:23 2001 +0000 +++ b/src/protocols/toc/toc.c Wed Aug 08 19:13:01 2001 +0000 @@ -744,14 +744,19 @@ static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) { char buf[BUF_LEN * 2]; + char *tmp = g_malloc(strlen(message) * 2); - escape_text(message); - if (strlen(message) + 52 > MSG_LEN) + strcpy(tmp, message); + escape_text(tmp); + if (strlen(tmp) + 52 > MSG_LEN) { + g_free(tmp); return -E2BIG; + } g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), - message, ((away) ? " auto" : "")); + tmp, ((away) ? " auto" : "")); sflap_send(gc, buf, -1, TYPE_DATA); + g_free(tmp); return 0; }