From: Antonio Radici Date: Mon, 12 Sep 2016 16:23:12 +0000 (+0100) Subject: Fix off-by-one in error message X-Git-Tag: neomutt-20160916~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=423d59c407e055486a5994a578f1d36d4cea0781;p=neomutt Fix off-by-one in error message Closes: #139 --- diff --git a/send.c b/send.c index 9de84d7bf..bceb4574b 100644 --- a/send.c +++ b/send.c @@ -1913,7 +1913,7 @@ main_loop: if (snprintf (errorstr, STRING, _("Message contains magic keyword \"%s\", but no attachments. Not sending."), AttachKeyword) == -1) { - errorstr[STRING] = 0; // terminate if need be. our string shouldn't be this long. + errorstr[STRING - 1] = 0; // terminate if need be. our string shouldn't be this long. } mutt_error (errorstr); }