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

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


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

Modified Files:
	istream-raw-mbox.c 
Log Message:
If mbox file contains only single LF, treat it as an invalid mbox file
instead of breaking later.



Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- istream-raw-mbox.c	9 Oct 2005 09:55:35 -0000	1.33
+++ istream-raw-mbox.c	27 Oct 2005 12:05:27 -0000	1.34
@@ -161,7 +161,7 @@
 				stream->buffer = buf;
 				return -2;
 			}
-		} else {
+		} else if (stream->istream.v_offset != 0) {
 			/* we've read the whole file, final byte should be
 			   the \n trailer */
 			if (pos > 0 && buf[pos-1] == '\n') {



More information about the dovecot-cvs mailing list