2.3.8 mbdump.c (cvs-1.33) bug?

Nik Conwell nik at bu.edu
Fri Jun 8 12:04:18 EDT 2007


After an xfermailbox between 2 backends, I noticed the sieve scripts now contain 
e-mails.

I tracked this down to dump_mailbox() (mbdump.c):

   mbdir = opendir(sieve_path);
    [...]
 	char tag_fname[2048];

 	while((next = readdir(mbdir)) != NULL) {
                 [...]
 		/* create tagged name */
 		if(sieve_isactive(sieve_path, next->d_name)) {
 		    snprintf(tag_fname, sizeof(tag_fname),
 			     "SIEVED-%s", next->d_name);
 		} else {
 		    snprintf(tag_fname, sizeof(tag_fname),
 			     "SIEVE-%s", next->d_name);
 		}
 			/* dump file */
 		r = dump_file(0, !tag, pin, pout, filename, tag_fname);
 		if (r) goto done;
             [...]

dump_file() gets passed 'filename' but that's not being set in the readdir loop. 
It's actually left over from the last message filename that was dumped.


More information about the Cyrus-devel mailing list