]> granicus.if.org Git - neomutt/commitdiff
If ContentType is null, assume text/plain. Stopgap; a better mechanism would
authorBrendan Cully <brendan@kublai.com>
Thu, 22 Sep 2005 03:23:09 +0000 (03:23 +0000)
committerBrendan Cully <brendan@kublai.com>
Thu, 22 Sep 2005 03:23:09 +0000 (03:23 +0000)
sanity-check MuttVars assignments before allowing them. Closes: #2080.

send.c

diff --git a/send.c b/send.c
index ccd6fcaebf4c0e638302adc7f172887919b9aefb..5d7363ed1ca0c47d3fa29c89e3f28195aff9840c 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1122,8 +1122,9 @@ ci_send_message (int flags,               /* send mode */
     pbody = mutt_new_body ();
     pbody->next = msg->content; /* don't kill command-line attachments */
     msg->content = pbody;
-    
-    ctype = safe_strdup (ContentType);
+
+    if (!(ctype = safe_strdup (ContentType)))
+      ctype = safe_strdup ("text/plain");
     mutt_parse_content_type (ctype, msg->content);
     FREE (&ctype);
     msg->content->unlink = 1;