diff -r 95b41c0f938e -r 4cfdde0aa3f1 src/protocols/toc/toc.c --- a/src/protocols/toc/toc.c Sat Aug 04 01:37:49 2001 +0000 +++ b/src/protocols/toc/toc.c Mon Aug 06 17:50:46 2001 +0000 @@ -741,14 +741,18 @@ return "TOC"; } -static void toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) +static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int away) { char buf[BUF_LEN * 2]; escape_text(message); + if (strlen(message) + 52 > MSG_LEN) + return -E2BIG; g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), message, ((away) ? " auto" : "")); sflap_send(gc, buf, -1, TYPE_DATA); + + return 0; } static void toc_set_config(struct gaim_connection *gc)