<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On 4. Nov 2020, at 13.24, Renaud Métrich <<a href="mailto:rmetrich@redhat.com" class="">rmetrich@redhat.com</a>> wrote:<br class=""><div><blockquote type="cite" class="">I would like to report an issue which is 100% reproducible with a
specific mail available in the reproducer attached to <a moz-do-not-send="true" href="https://bugzilla.redhat.com/show_bug.cgi?id=1894418" class="">Red
Hat's bugzilla</a>
(<a class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/attachment.cgi?id=1726535">https://bugzilla.redhat.com/attachment.cgi?id=1726535</a>):<br class=""><div class=""><div class=""><div class="">When performing a "FETCH <ID> (BINARY.SIZE[1]</div><pre class=""> BINARY.PEEK[1])" operation, imap crashes with following backtrace:</pre>
</div></div></blockquote><br class=""></div><div>Thanks, this should fix it:</div><div><br class=""></div><div>diff --git a/src/lib-storage/index/index-mail-binary.c b/src/lib-storage/index/index-mail-binary.c<br class="">index 2577f1afe5..f7bf984916 100644<br class="">--- a/src/lib-storage/index/index-mail-binary.c<br class="">+++ b/src/lib-storage/index/index-mail-binary.c<br class="">@@ -339,7 +339,7 @@ blocks_count_lines(struct binary_ctx *ctx, struct istream *full_input)<br class=""> i_stream_skip(full_input, skip);<br class=""> cur_block_offset += skip;<br class=""><br class="">- if (cur_block->input->eof) {<br class="">+ if (i_stream_read_eof(cur_block->input)) {<br class=""> /* go to the next block */<br class=""> if (++block_idx == block_count) {<br class=""> i_assert(i_stream_read_eof(full_input));</div><br class=""></body></html>