changeset 3299:361ce931354e HEAD

Don't allow FETCH BODY[HEADER.FIELDS ()], ie. empty list.
author Timo Sirainen <tss@iki.fi>
date Sun, 17 Apr 2005 18:42:14 +0300
parents ed7e4f7a2315
children 23fceec1e5c9
files src/imap/imap-fetch-body.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/imap-fetch-body.c	Sun Apr 17 17:57:18 2005 +0300
+++ b/src/imap/imap-fetch-body.c	Sun Apr 17 18:42:14 2005 +0300
@@ -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;