dovecot-1.1: If dovecot-uidlist contains a filename with '/', lo...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 26 18:49:39 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/5532bc0eb7bc
changeset: 7557:5532bc0eb7bc
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 26 18:49:35 2008 +0300
description:
If dovecot-uidlist contains a filename with '/', log an error and recreate
the uidlist instead of assert-crashing.

diffstat:

1 file changed, 7 insertions(+)
src/lib-storage/index/maildir/maildir-uidlist.c |    7 +++++++

diffs (17 lines):

diff -r ded075753258 -r 5532bc0eb7bc src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Mon May 26 18:47:24 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Mon May 26 18:49:35 2008 +0300
@@ -428,6 +428,13 @@ static bool maildir_uidlist_next(struct 
 				"Invalid extended fields: %s", line);
 			return FALSE;
 		}
+	}
+
+	if (strchr(line, '/') != NULL) {
+		maildir_uidlist_set_corrupted(uidlist, 
+			"%s: Broken filename at line %u: %s",
+			uidlist->path, uidlist->read_line_count, line);
+		return 0;
 	}
 
 	old_rec = hash_lookup(uidlist->files, line);


More information about the dovecot-cvs mailing list