Andreas Krennmair:
[apps/madmutt.git] / edit.c
diff --git a/edit.c b/edit.c
index e29cb66..7e8f507 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -118,7 +118,7 @@ static int be_barf_file (const char *path, char **buf, int buflen)
   FILE *f;
   int i;
   
-  if ((f = fopen (path, "w")) == NULL)         /* __FOPEN_CHECKED__ */
+  if ((f = safe_fopen (path, "w")) == NULL)            /* __FOPEN_CHECKED__ */
   {
     addstr (strerror (errno));
     addch ('\n');
@@ -463,7 +463,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);