dovecot-1.1: maildir: Don't access uninitialized variables.

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 2 20:51:52 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.1/rev/c73be201a48b
changeset: 8337:c73be201a48b
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 02 13:51:47 2009 -0400
description:
maildir: Don't access uninitialized variables.

diffstat:

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

diffs (12 lines):

diff -r 25395b1fa1b7 -r c73be201a48b src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Thu Jul 30 14:07:13 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Sun Aug 02 13:51:47 2009 -0400
@@ -899,7 +899,7 @@ int maildir_uidlist_refresh_fast_init(st
 	if ((ret = maildir_uidlist_stat(uidlist, &st)) < 0)
 		return ret;
 
-	if ((uoff_t)st.st_size == mhdr->uidlist_size &&
+	if (ret > 0 && (uoff_t)st.st_size == mhdr->uidlist_size &&
 	    st.st_mtime == (time_t)mhdr->uidlist_mtime &&
 	    ST_NTIMES_EQUAL(ST_MTIME_NSEC(st), mhdr->uidlist_mtime_nsecs) &&
 	    (!mail_index_is_in_memory(index) || st.st_mtime < ioloop_time-1)) {


More information about the dovecot-cvs mailing list