[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.68,1.69

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


Update of /var/lib/cvs/dovecot/src/lib-mail
In directory talvi:/tmp/cvs-serv11902

Modified Files:
	message-parser.c 
Log Message:
If message header ends unexpectedly, return it anyway instead of ignoring it
completely.



Index: message-parser.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- message-parser.c	12 Jul 2005 20:45:27 -0000	1.68
+++ message-parser.c	27 Oct 2005 12:11:11 -0000	1.69
@@ -748,6 +748,12 @@
 
 		if (ret <= 0 && startpos == size) {
 			if (ret == -1) {
+				if (startpos > 0) {
+					/* header ended unexpectedly. */
+					line->no_newline = TRUE;
+					ctx->skip = startpos;
+					break;
+				}
 				/* error / EOF with no bytes */
 				return -1;
 			}



More information about the dovecot-cvs mailing list