Patch to fix the DATA bug



The following patch fixes the DATA bug in SMTP sends:

Index: libbalsa/send.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/send.c,v
retrieving revision 1.52
diff -U3 -r1.52 send.c
--- libbalsa/send.c	2000/04/01 18:08:21	1.52
+++ libbalsa/send.c	2000/04/06 10:14:57
@@ -693,9 +693,10 @@
   total = (int)st.st_size;
 #endif  
 
-  while ((left = (int)read (fp, message, sizeof(message)))!=0)
+  while ((left = (int)read(fp, message, 499)) > 0)
   {
-    tmpbuffer = message;
+    message[left] = 0;
+	tmpbuffer = message;
     while ((tmp = strstr(tmpbuffer,"\n"))!=NULL)
     {
 	    len = (int)strcspn(tmpbuffer,"\n");




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]