Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5422:01c63c0adc3b HEAD
fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 26 Mar 2007 02:45:49 +0300 |
parents | 3a3e1b234858 |
children | 2500d126f865 |
files | src/lib-mail/message-decoder.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-mail/message-decoder.c Mon Mar 26 02:18:49 2007 +0300 +++ b/src/lib-mail/message-decoder.c Mon Mar 26 02:45:49 2007 +0300 @@ -242,7 +242,7 @@ quoted_printable_decode(new_buf, ctx->encoding_size + skip, &pos, ctx->buf); - i_assert(pos > ctx->encoding_size); + i_assert(pos >= ctx->encoding_size); skip = pos - ctx->encoding_size; } @@ -261,7 +261,7 @@ the rest of it */ return FALSE; } - i_assert(pos > ctx->encoding_size); + i_assert(pos >= ctx->encoding_size); skip = pos - ctx->encoding_size; } if (base64_decode(input->data + skip, input->size - skip, @@ -288,6 +288,8 @@ i_assert(ctx->encoding_size <= sizeof(ctx->encoding_buf)); memcpy(ctx->encoding_buf, input->data + pos, ctx->encoding_size); + } else { + ctx->encoding_size = 0; } if (ctx->charset_utf8 || ctx->charset_trans == NULL) {