[dovecot-cvs] dovecot/src/pop3 commands.c,1.40,1.41

cras at dovecot.org cras at dovecot.org
Sun May 8 12:38:39 EEST 2005


Update of /var/lib/cvs/dovecot/src/pop3
In directory talvi:/tmp/cvs-serv651

Modified Files:
	commands.c 
Log Message:
If we couldn't fetch header MD5/filename for UIDL, abort instead of giving  
invalid UIDL.



Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- commands.c	15 Mar 2005 19:01:53 -0000	1.40
+++ commands.c	8 May 2005 09:38:36 -0000	1.41
@@ -514,11 +514,21 @@
 		if ((uidl_keymask & UIDL_MD5) != 0) {
 			tab[2].value = mail_get_special(ctx->mail,
 							MAIL_FETCH_HEADER_MD5);
+			if (tab[2].value == NULL) {
+				/* broken */
+				t_pop();
+				break;
+			}
 		}
 		if ((uidl_keymask & UIDL_FILE_NAME) != 0) {
 			tab[3].value =
 				mail_get_special(ctx->mail,
 						 MAIL_FETCH_UIDL_FILE_NAME);
+			if (tab[3].value == NULL) {
+				/* broken */
+				t_pop();
+				break;
+			}
 		}
 
 		str_truncate(str, 0);



More information about the dovecot-cvs mailing list