Nico Golde:
[apps/madmutt.git] / edit.c
diff --git a/edit.c b/edit.c
index 8cd407b..1674248 100644 (file)
--- a/edit.c
+++ b/edit.c
 
 /* Close approximation of the mailx(1) builtin editor for sending mail. */
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
@@ -463,7 +467,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur)
       done = 1;
     else
     {
-      strncat (tmp, "\n", sizeof(tmp)); tmp[sizeof(tmp) - 1] = '\0';
+      safe_strcat (tmp, sizeof (tmp), "\n");
       if (buflen == bufmax)
        safe_realloc (&buf, sizeof (char *) * (bufmax += 25));
       buf[buflen++] = safe_strdup (tmp[1] == '~' ? tmp + 1 : tmp);