t_push();
/* first pass, we need at least the size */
- if (size->virtual_size > MAX_HEADER_BUFFER_SIZE &&
- body->max_size > MAX_HEADER_BUFFER_SIZE &&
- !ctx->body_fetch_from_cache) {
+ if (!ctx->body_fetch_from_cache &&
+ size->virtual_size > MAX_HEADER_BUFFER_SIZE &&
+ body->max_size > MAX_HEADER_BUFFER_SIZE) {
if (!fetch_header_fields(input, header_section, &hdr_ctx))
failed = TRUE;
struct istream *stream;
struct message_size hdr_size;
- if (ctx->body_fetch_from_cache)
+ if (ctx->body_fetch_from_cache) {
+ memset(&hdr_size, 0, sizeof(hdr_size));
stream = NULL;
- else {
+ } else {
stream = mail->get_stream(mail, &hdr_size, NULL);
if (stream == NULL)
return FALSE;