--- 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");