[dovecot-cvs] dovecot/src/imap imap-fetch-body.c,1.21,1.22

cras at dovecot.org cras at dovecot.org
Sun Apr 17 18:42:16 EEST 2005


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv21669/imap

Modified Files:
	imap-fetch-body.c 
Log Message:
Don't allow FETCH BODY[HEADER.FIELDS ()], ie. empty list.



Index: imap-fetch-body.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch-body.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- imap-fetch-body.c	2 Apr 2005 22:44:06 -0000	1.21
+++ imap-fetch-body.c	17 Apr 2005 15:42:14 -0000	1.22
@@ -560,6 +560,9 @@
 	if (*section++ != '(')
 		return FALSE;
 
+	if (*section == ')')
+		return FALSE; /* has to be at least one field */
+
 	while (*section != '\0' && *section != ')') {
 		if (*section == '(')
 			return FALSE;



More information about the dovecot-cvs mailing list