]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
If dovecot-uidlist contains a filename with '/', log an error and recreate
authorTimo Sirainen <tss@iki.fi>
Mon, 26 May 2008 15:49:35 +0000 (18:49 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 26 May 2008 15:49:35 +0000 (18:49 +0300)
the uidlist instead of assert-crashing.

--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-uidlist.c

index fd6e051c2870de5d374cf152c4272de2209b1e66..95db7e38ecf619eb760cce793dac509f0c440009 100644 (file)
@@ -430,6 +430,13 @@ static bool maildir_uidlist_next(struct maildir_uidlist *uidlist,
                }
        }
 
+       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);
        if (old_rec != NULL) {
                /* This can happen if expunged file is moved back and the file