diff src/protocols/msn/msn.c @ 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 63628fddf121
children 1143524a2eaf
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");