[dovecot-cvs] dovecot/src/lib-storage/index index-save.c,1.24,1.25

cras at procontrol.fi cras at procontrol.fi
Wed Feb 19 23:31:37 EET 2003


Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv18604

Modified Files:
	index-save.c 
Log Message:
Don't save the message if EOF comes too early



Index: index-save.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-save.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- index-save.c	22 Jan 2003 19:23:28 -0000	1.24
+++ index-save.c	19 Feb 2003 21:31:35 -0000	1.25
@@ -88,6 +88,12 @@
 			errno = input->stream_errno;
 			if (errno == 0) {
 				/* EOF */
+				if (input->v_offset != input->v_limit) {
+					/* too early */
+					mail_storage_set_error(storage,
+						"Unexpected EOF");
+					failed = TRUE;
+				}
 				break;
 			} else if (errno == EAGAIN) {
 				mail_storage_set_error(storage,




More information about the dovecot-cvs mailing list