[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.83,1.84
tss at dovecot.org
tss at dovecot.org
Wed Mar 28 00:56:55 EEST 2007
Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv1721
Modified Files:
message-parser.c
Log Message:
yet another fix
Index: message-parser.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- message-parser.c 25 Mar 2007 18:27:16 -0000 1.83
+++ message-parser.c 27 Mar 2007 21:56:53 -0000 1.84
@@ -321,12 +321,14 @@
for (i = boundary_start = 0; i < block_r->size; i++) {
/* skip to beginning of the next line. the first line was
handled already. */
+ size_t next_line_idx = block_r->size;
+
for (; i < block_r->size; i++) {
if (data[i] == '\n') {
boundary_start = i;
if (i > 0 && data[i-1] == '\r')
boundary_start--;
- i++;
+ next_line_idx = i + 1;
break;
}
}
@@ -336,13 +338,13 @@
full = FALSE;
}
- ret = boundary_line_find(ctx, block_r->data + i,
- block_r->size - i, full,
+ ret = boundary_line_find(ctx, block_r->data + next_line_idx,
+ block_r->size - next_line_idx, full,
&boundary);
if (ret >= 0) {
/* found / need more data */
if (ret == 0 && boundary_start == 0)
- ctx->want_count += i;
+ ctx->want_count += next_line_idx;
break;
}
}
More information about the dovecot-cvs
mailing list