]> granicus.if.org Git - mutt/commitdiff
Enlarge temporary buffer in hdr_format_str to prevent subject truncation.
authorRocco Rutte <pdmef@gmx.net>
Thu, 18 Oct 2007 08:20:49 +0000 (10:20 +0200)
committerRocco Rutte <pdmef@gmx.net>
Thu, 18 Oct 2007 08:20:49 +0000 (10:20 +0200)
The subject along with the thread tree are composed using a
SHORT_STRING-sized buffer which may lead to truncation even
though the destination buffer is large enough.

hdrline.c

index a4cfb263c503d5fa2cca1105fffb5bd2add13a19..1e63f78700f0e36ce0996933896516bd4e457712 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -243,7 +243,7 @@ hdr_format_str (char *dest,
   struct hdr_format_info *hfi = (struct hdr_format_info *) data;
   HEADER *hdr, *htmp;
   CONTEXT *ctx;
-  char fmt[SHORT_STRING], buf2[SHORT_STRING], ch, *p;
+  char fmt[SHORT_STRING], buf2[LONG_STRING], ch, *p;
   int do_locales, i;
   int optional = (flags & M_FORMAT_OPTIONAL);
   int threads = ((Sort & SORT_MASK) == SORT_THREADS);