Mercurial > dovecot > core-2.2
changeset 1095:714661dacead HEAD
Valid From-line parsing could have crashed too.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 04 Feb 2003 05:37:51 +0200 |
parents | c1e099b65be0 |
children | 2ea48622afbc |
files | src/lib-index/mbox/mbox-index.c |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-index.c Tue Feb 04 05:25:44 2003 +0200 +++ b/src/lib-index/mbox/mbox-index.c Tue Feb 04 05:37:51 2003 +0200 @@ -551,7 +551,15 @@ break; case 'm': if (msg[i] == ' ') { - if (mbox_is_valid_from(input, i+1)) { + int valid; + + valid = mbox_is_valid_from(input, i+1); + + /* we may have trashed msg above, + get it again */ + msg = i_stream_get_data(input, &size); + + if (valid) { /* Go back "From" */ i -= 4; @@ -567,10 +575,6 @@ i_stream_skip(input, i); return; } - - /* we may have trashed msg on the way, - get it again */ - msg = i_stream_get_data(input, &size); } break; }