Update of /cvsroot/mahogany/M/lib/dspam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13895/lib/dspam
Modified Files:
decode.c
Log Message:
handle network EOLS (0xd 0xa) again
Index: decode.c
===================================================================
RCS file: /cvsroot/mahogany/M/lib/dspam/decode.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -2 -r1.5 -r1.6
--- decode.c 23 Oct 2004 16:12:59 -0000 1.5
+++ decode.c 24 Oct 2004 20:41:23 -0000 1.6
@@ -111,4 +111,11 @@
while (line != NULL)
{
+ /*
+ if the message has "\r\n" as line separator, simply drop '\r': this
+ allows us to handle messages with both Unix and Internet EOLs
+ */
+ size_t lenLine = strlen(line);
+ if ( lenLine && line[lenLine - 1] == 0xd )
+ line[lenLine - 1] = 0;
/* Header Processing */
@@ -151,5 +158,5 @@
current_heading->data =
realloc (current_heading->data,
- strlen (current_heading->data) + strlen (line) + 2);
+ strlen (current_heading->data) + lenLine + 2);
if (current_heading->data != NULL)
{
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates