dovecot: Ignore entries with empty keyword names.

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 27 19:13:52 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/7d8825366e80
changeset: 6329:7d8825366e80
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 27 19:13:48 2007 +0300
description:
Ignore entries with empty keyword names.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-keywords.c |    2 +-

diffs (12 lines):

diff -r 29d249982282 -r 7d8825366e80 src/lib-storage/index/maildir/maildir-keywords.c
--- a/src/lib-storage/index/maildir/maildir-keywords.c	Mon Aug 27 19:13:36 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-keywords.c	Mon Aug 27 19:13:48 2007 +0300
@@ -144,7 +144,7 @@ static int maildir_keywords_sync(struct 
 		*p++ = '\0';
 
 		idx = atoi(line);
-		if (idx < 0 || idx >= MAILDIR_MAX_KEYWORDS) {
+		if (idx < 0 || idx >= MAILDIR_MAX_KEYWORDS || *p == '\0') {
 			/* shouldn't happen */
 			continue;
 		}


More information about the dovecot-cvs mailing list