[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.23,1.24
cras at procontrol.fi
cras at procontrol.fi
Fri Oct 25 08:20:38 EEST 2002
Update of /home/cvs/dovecot/src/lib-mail
In directory danu:/tmp/cvs-serv2053
Modified Files:
message-parser.c
Log Message:
still not right
Index: message-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- message-parser.c 25 Oct 2002 04:16:50 -0000 1.23
+++ message-parser.c 25 Oct 2002 04:20:36 -0000 1.24
@@ -328,18 +328,13 @@
continue;
}
- if (size <= startpos) {
- if (ret <= 0) {
- /* EOF and nothing in buffer. the later check is
- needed only when there's no message body */
- break;
- }
-
- parse_size = size;
- } else {
- parse_size = size-1;
+ if (ret < 0 || (ret <= 0 && size == startpos)) {
+ /* EOF and nothing in buffer. the later check is
+ needed only when there's no message body */
+ break;
}
+ parse_size = size <= startpos+1 ? size : size-1;
for (i = startpos; i < parse_size; i++) {
if (msg[i] == ':' && colon_pos == UINT_MAX) {
colon_pos = i;
More information about the dovecot-cvs
mailing list