[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-mail.c, 1.23, 1.24

cras at dovecot.org cras at dovecot.org
Wed Mar 16 00:16:54 EET 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv21345/lib-storage/index/mbox

Modified Files:
	mbox-mail.c 
Log Message:
get_physical_size() was crashing if mbox hadn't been opened yet.



Index: mbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-mail.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mbox-mail.c	15 Mar 2005 19:01:53 -0000	1.23
+++ mbox-mail.c	15 Mar 2005 22:16:52 -0000	1.24
@@ -120,6 +120,9 @@
 	struct istream *stream;
 	uoff_t hdr_offset, body_offset, body_size;
 
+	if (mbox_mail_seek(mail) <= 0)
+		return (uoff_t)-1;
+
 	/* our header size varies, so don't do any caching */
 	stream = mail->ibox->mbox_stream;
 	hdr_offset = istream_raw_mbox_get_header_offset(stream);



More information about the dovecot-cvs mailing list