simplifications around mutt_is_message_type
[apps/madmutt.git] / lib-mime / rfc1524.c
index 08090e0..8705ace 100644 (file)
@@ -301,7 +301,7 @@ rfc1524_mailcap_parse(BODY *a, const char *filename, const char *type,
                     ssize_t len   = m_strlen(value) + STRING;
                     char *testcmd = p_new(char, len);
 
-                    strcpy(testcmd, value);
+                    m_strcpy(testcmd, len, value);
                     rfc1524_expand_command(a, a->filename, type, testcmd, len);
                     found = !mutt_system(testcmd);
                     p_delete(&testcmd);
@@ -338,7 +338,7 @@ rfc1524_mailcap_parse(BODY *a, const char *filename, const char *type,
             rfc1524_entry_init(entry);
         }
     }                           /* while (!found && (buf = mutt_read_line ())) */
-    fclose (fp);
+    m_fclose(&fp);
 
   error:
     p_delete(&buf);