524e717
diff -up mutt-1.5.21/sendlib.c.writehead mutt-1.5.21/sendlib.c
524e717
--- mutt-1.5.21/sendlib.c.writehead	2012-06-25 14:41:34.681483226 +0200
524e717
+++ mutt-1.5.21/sendlib.c	2012-06-25 14:41:44.485408610 +0200
524e717
@@ -1799,7 +1799,7 @@ static int write_one_header (FILE *fp, i
524e717
   else
524e717
   {
524e717
     t = strchr (start, ':');
524e717
-    if (t > end)
524e717
+    if (t == NULL || t > end)
524e717
     {
524e717
       dprint (1, (debugfile, "mwoh: warning: header not in "
524e717
 		  "'key: value' format!\n"));