From 1f558edaee97ea7815bb2556f363f2f096153766 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 11 Jun 2009 14:53:31 -0400 Subject: [PATCH] mbox: Don't crash with invalid From_-lines. --HG-- branch : HEAD --- src/lib-storage/index/mbox/istream-raw-mbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib-storage/index/mbox/istream-raw-mbox.c b/src/lib-storage/index/mbox/istream-raw-mbox.c index 7e934d84ad..52416c4035 100644 --- a/src/lib-storage/index/mbox/istream-raw-mbox.c +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c @@ -336,7 +336,7 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream) 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(struct istream_private *stream) /* 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 { -- 2.47.3