# HG changeset patch # User meillo@marmaro.de # Date 1276707994 -7200 # Node ID 257a9e6d1a8e7e4b4bc4ed2668a89f821d321971 # Parent 0a5b2e96ade371018b9a0d7707a4b51dff2cc1cf fixed correct processing of mails with data lines longer 4096 chars Mail messages with lines longer than 4096 chars were already read correctly, i.e. the spool files were correct. This commit fixes the reading of spool files with long lines. The old behavior was that the message body was truncated right before the first line longer 4096 chars. The number comes from MAX_DATALINE. diff -r 0a5b2e96ade3 -r 257a9e6d1a8e src/spool.c --- a/src/spool.c Wed Jun 16 10:39:44 2010 +0200 +++ b/src/spool.c Wed Jun 16 19:06:34 2010 +0200 @@ -29,7 +29,9 @@ while ((c = getc(in)) != '\n' && (c != EOF)) { if (p >= buf_len - 1) { - return 0; + buf[buf_len-1] = '\0'; + ungetc(c, in); + return buf_len; } buf[p++] = c; }