[dovecot-cvs] dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.34, 1.35

cras at dovecot.org cras at dovecot.org
Thu Oct 27 15:34:34 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv12519

Modified Files:
	istream-raw-mbox.c 
Log Message:
if message was only 0-1 bytes, we skipped the whole message which caused
crashes



Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- istream-raw-mbox.c	27 Oct 2005 12:05:27 -0000	1.34
+++ istream-raw-mbox.c	27 Oct 2005 12:34:32 -0000	1.35
@@ -177,7 +177,11 @@
 			stream->buffer = buf;
 			stream->pos = pos;
 
-			rstream->eof = TRUE;
+			if (stream->istream.v_offset == rstream->from_offset) {
+				/* haven't seen From-line yet, so this mbox
+				   stream is now at EOF */
+				rstream->eof = TRUE;
+			}
 			stream->istream.eof = TRUE;
 			handle_end_of_mail(rstream, pos);
 			return ret < 0 ? _read(stream) : ret;



More information about the dovecot-cvs mailing list