From: Michael Elkins Date: Fri, 25 Nov 2011 20:52:55 +0000 (-0800) Subject: Check that $sendmail is set to avoid potential segfault. Closes #3548. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23b9e2634ae32e5b8416f2426d58028f562c9a03;p=neomutt Check that $sendmail is set to avoid potential segfault. Closes #3548. --- diff --git a/sendlib.c b/sendlib.c index 4daafaff0..1ee7fb2b1 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2344,6 +2344,13 @@ mutt_invoke_sendmail (ADDRESS *from, /* the sender */ size_t argslen = 0, argsmax = 0; int i; + /* ensure that $sendmail is set to avoid a crash. http://dev.mutt.org/trac/ticket/3548 */ + if (!s) + { + mutt_error(_("$sendmail must be set in order to send mail.")); + return -1; + } + ps = s; i = 0; while ((ps = strtok (ps, " ")))