changeset 9124:96aec5ab1a52 HEAD

mbox: Don't crash with invalid From_-lines.
author Timo Sirainen <tss@iki.fi>
date Thu, 11 Jun 2009 14:53:31 -0400
parents a9d3108d0cec
children 6c0fb914e03e
files src/lib-storage/index/mbox/istream-raw-mbox.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Fri Jun 05 10:06:22 2009 -0400
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Thu Jun 11 14:53:31 2009 -0400
@@ -336,7 +336,7 @@
 							   from_start_pos);
 					break;
 				}
-				from_start_pos = (size_t)-1;
+				from_after_pos = (size_t)-1;
 			}
 		} else {
 			fromp = mbox_from;
@@ -348,7 +348,7 @@
 	/* 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 {