Use good m_ functions, because it smell like a flower, version 2.
[apps/madmutt.git] / handler.c
index 0f37639..c72ddfc 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -483,7 +483,7 @@ static void enriched_flush (struct enriched_state *stte, int wrap)
       stte->line_max = stte->line_used;
       p_realloc(&stte->line, stte->line_max + 1);
     }
-    strcat (stte->line, stte->buffer);  /* __STRCAT_CHECKED__ */
+    m_strcat(stte->line, stte->line_max + 1, stte->buffer);
     stte->line_len += stte->word_len;
     stte->word_len = 0;
     stte->buff_used = 0;
@@ -1250,12 +1250,11 @@ void mutt_decode_attachment (BODY * b, STATE * s)
     if (s->flags & M_CHARCONV) {
       const char *charset = parameter_getval(b->parameter, "charset");
 
-      if (!option (OPTSTRICTMIME) && !charset)
+      if (!charset)
         charset = charset_getfirst(AssumedCharset);
       if (charset && Charset)
         cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM);
-    }
-    else {
+    } else {
       if (b->file_charset)
         cd = mutt_iconv_open (Charset, b->file_charset, M_ICONV_HOOK_FROM);
     }
@@ -1415,7 +1414,7 @@ int mutt_body_handler (BODY * b, STATE * s)
       if (decode) {
         b->length = ftello (s->fpout);
         b->offset = 0;
-        fclose (s->fpout);
+        m_fclose(&s->fpout);
 
         /* restore final destination and substitute the tempfile for input */
         s->fpout = fp;
@@ -1439,7 +1438,7 @@ int mutt_body_handler (BODY * b, STATE * s)
         b->offset = tmpoffset;
 
         /* restore the original source stream */
-        fclose (s->fpin);
+        m_fclose(&s->fpin);
         s->fpin = fp;
       }
     }