about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarcin Niestroj <m.niestroj@grinn-global.com>2018-08-30 12:56:34 +0200
committerLeah Neukirchen <leah@vuxu.org>2018-08-30 13:08:08 +0200
commit8274295d908556862ef434ace6f6d0efe333759a (patch)
tree035c6124ccb0d72cb64ba7ea6f705dfdae69a670
parent5dbed68b6a2871a448a120b235f3799afd4c9245 (diff)
downloadmblaze-8274295d908556862ef434ace6f6d0efe333759a.tar.gz
mblaze-8274295d908556862ef434ace6f6d0efe333759a.tar.xz
mblaze-8274295d908556862ef434ace6f6d0efe333759a.zip
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]
-rw-r--r--mpick.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpick.c b/mpick.c
index e1d1df2..d15d1d4 100644
--- a/mpick.c
+++ b/mpick.c
@@ -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;