]> granicus.if.org Git - neomutt/commitdiff
fix parameter usage of calloc()
authorRichard Russon <rich@flatcap.org>
Tue, 20 Aug 2019 20:55:58 +0000 (21:55 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 21 Aug 2019 13:12:06 +0000 (14:12 +0100)
enriched.c
recvattach.c

index af84fc2ee715b5a6b55770be8a4ba33b3d07b36c..018205bc3597681e3b173c8a6b4405d9f3743c65 100644 (file)
@@ -482,8 +482,8 @@ int text_enriched_handler(struct Body *a, struct State *s)
            (MuttIndexWindow->cols - 4) :
            ((MuttIndexWindow->cols - 4) < 72) ? (MuttIndexWindow->cols - 4) : 72);
   stte.line_max = stte.wrap_margin * 4;
-  stte.line = mutt_mem_calloc(1, (stte.line_max + 1) * sizeof(wchar_t));
-  stte.param = mutt_mem_calloc(1, 256 * sizeof(wchar_t));
+  stte.line = mutt_mem_calloc((stte.line_max + 1), sizeof(wchar_t));
+  stte.param = mutt_mem_calloc(256, sizeof(wchar_t));
 
   stte.param_len = 256;
   stte.param_used = 0;
index 58ef31940af1b35640c1f3c4d515b8089f182596..819117c12f31f07e56ca6dc504f3a27ed4cf4ba1 100644 (file)
@@ -1422,7 +1422,7 @@ void mutt_view_attachments(struct Email *e)
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_ATTACH, AttachHelp);
   mutt_menu_push_current(menu);
 
-  struct AttachCtx *actx = mutt_mem_calloc(sizeof(struct AttachCtx), 1);
+  struct AttachCtx *actx = mutt_mem_calloc(1, sizeof(struct AttachCtx));
   actx->email = e;
   actx->fp_root = msg->fp;
   mutt_update_recvattach_menu(actx, menu, true);