dovecot-2.0: mbox: Don't crash with invalid From_-lines.

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 11 22:02:27 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/1f7f7c0aa711
changeset: 9463:1f7f7c0aa711
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 11 14:53:31 2009 -0400
description:
mbox: Don't crash with invalid From_-lines.

diffstat:

1 file changed, 2 insertions(+), 2 deletions(-)
src/lib-storage/index/mbox/istream-raw-mbox.c |    4 ++--

diffs (21 lines):

diff -r e03003e935b5 -r 1f7f7c0aa711 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Tue Jun 09 11:16:57 2009 -0700
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Thu Jun 11 14:53:31 2009 -0400
@@ -336,7 +336,7 @@ static ssize_t i_stream_raw_mbox_read(st
 							   from_start_pos);
 					break;
 				}
-				from_start_pos = (size_t)-1;
+				from_after_pos = (size_t)-1;
 			}
 		} else {
 			fromp = mbox_from;
@@ -348,7 +348,7 @@ static ssize_t i_stream_raw_mbox_read(st
 	/* we want to go at least one byte further next time */
 	rstream->input_peak_offset = stream->istream.v_offset + i;
 
-	if (from_start_pos != (size_t)-1) {
+	if (from_after_pos != (size_t)-1) {
 		/* we're waiting for the \n at the end of From-line */
 		new_pos = from_start_pos;
 	} else {


More information about the dovecot-cvs mailing list