mpick: Increase buffer for decoded header field

When using:

  $ mlist maildir | mpick -t '"cc" ~~ "*vger.kernel.org*"'

with a maildir containing mails from Linux Mailing List, not all
messages were picked correctly. It turned out that the reason was
small (100 bytes) buffer for header fields.

Increase header field buffer to 4096, which is the most commonly used
value.

Closes: #133 [via git-merge-pr]
pull/134/merge
Marcin Niestroj 6 years ago committed by Leah Neukirchen
parent 5dbed68b6a
commit 8274295d90

@ -809,7 +809,7 @@ msg_hdr(struct mailinfo *m, const char *h)
if (!m->msg || !(b = blaze822_chdr(m->msg, h)))
goto err;
char buf[100];
char buf[4096];
blaze822_decode_rfc2047(buf, b, sizeof buf - 1, "UTF-8");
if (!*buf)
goto err;

Loading…
Cancel
Save