[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.64,1.65
cras at dovecot.org
cras at dovecot.org
Tue Oct 26 07:38:43 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv20187/lib-mail
Modified Files:
message-parser.c
Log Message:
Don't show extra LFs in lines longer than input buffer size.
Index: message-parser.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- message-parser.c 8 Oct 2004 17:51:48 -0000 1.64
+++ message-parser.c 26 Oct 2004 04:38:40 -0000 1.65
@@ -680,7 +680,7 @@
struct message_header_line *line = &ctx->line;
const unsigned char *msg;
size_t i, size, startpos, colon_pos, parse_size;
- int ret;
+ int ret, last_no_newline;
*hdr_r = NULL;
if (line->eoh)
@@ -693,6 +693,7 @@
startpos = 0; colon_pos = UINT_MAX;
+ last_no_newline = line->no_newline;
line->no_newline = FALSE;
if (line->continues) {
@@ -914,7 +915,8 @@
line->full_value_len = line->value_len;
} else if (line->use_full_value) {
/* continue saving the full value */
- buffer_append_c(ctx->value_buf, '\n');
+ if (!last_no_newline)
+ buffer_append_c(ctx->value_buf, '\n');
buffer_append(ctx->value_buf, line->value, line->value_len);
line->full_value = buffer_get_data(ctx->value_buf,
&line->full_value_len);
More information about the dovecot-cvs
mailing list