dovecot-2.2: maildir: Fixed crash in some rare situations.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Apr 16 15:54:17 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/f33bacb03cc2
changeset: 16290:f33bacb03cc2
user: Timo Sirainen <tss at iki.fi>
date: Tue Apr 16 15:54:05 2013 +0300
description:
maildir: Fixed crash in some rare situations.
diffstat:
src/lib-storage/index/maildir/maildir-util.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 9a5b132b6832 -r f33bacb03cc2 src/lib-storage/index/maildir/maildir-util.c
--- a/src/lib-storage/index/maildir/maildir-util.c Mon Apr 15 21:40:35 2013 +0300
+++ b/src/lib-storage/index/maildir/maildir-util.c Tue Apr 16 15:54:05 2013 +0300
@@ -87,6 +87,9 @@
fname = maildir_filename_guess(mbox, uid, fname,
&flags, &have_flags);
}
+ /* make a copy, just in case callback refreshes uidlist and
+ the pointer becomes invalid. */
+ fname = t_strdup(fname);
ret = 0;
if ((flags & MAILDIR_UIDLIST_REC_FLAG_NEW_DIR) != 0) {
More information about the dovecot-cvs
mailing list