Mercurial > dovecot > core-2.2
changeset 9463:1f7f7c0aa711 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 | e03003e935b5 |
children | a5f5584646ed |
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 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 @@ 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 {