[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.25,1.26
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.25,1.26 |
Date: |
Tue, 14 Jan 2003 10:12:15 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2
In directory subversions:/tmp/cvs-serv20834/modules/msn2
Modified Files:
msn.C
Log Message:
try to fight buffer overflows & read() timeouts
Index: msn.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/msn.C,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- msn.C 14 Jan 2003 12:03:11 -0000 1.25
+++ msn.C 14 Jan 2003 15:12:13 -0000 1.26
@@ -657,13 +657,13 @@
msg->font = NULL;
msg->colour = NULL;
msg->content = "text/plain; charset=UTF-8";
- if(strlen(mess)>2000)
+ if(strlen(mess)>1100)
{
char buf[1024];
- snprintf(buf, 1024, "Warning - your last message was too long for
the MSN service. The last %d characters were not sent.", strlen(mess)-2000);
+ snprintf(buf, 1024, "Warning - your last message was too long for
the MSN service. The last %d characters were not sent.", strlen(mess)-1100);
do_error_dialog(buf, "MSN: Message truncated");
}
- msg->body = g_strndup(StrToUtf8(mess), 1998);
+ msg->body = g_strndup(StrToUtf8(mess), 1098);
eb_msn_local_account_data * mlad;
mlad = (eb_msn_local_account_data *)from->protocol_local_account_data;
@@ -1107,7 +1107,13 @@
{
message * msg=new message;
msg->header=NULL;
- msg->body=g_strndup(StrToUtf8(mess), 1998);
+ if(strlen(mess)>1100)
+ {
+ char buf[1024];
+ snprintf(buf, 1024, "Warning - your last message was too long for
the MSN service. The last %d characters were not sent.", strlen(mess)-1100);
+ do_error_dialog(buf, "MSN: Message truncated");
+ }
+ msg->body = g_strndup(StrToUtf8(mess), 1098);
msg->font=NULL;
msg->content=strdup("text/plain; charset=UTF-8");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.25,1.26,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.3,1.4 msn_core.C,1.10,1.11
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.11,1.12
- Previous by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_bittybits.C,1.3,1.4 msn_core.C,1.10,1.11
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.11,1.12
- Index(es):