From: Ralph Corderoy Date: Sun, 10 Sep 2017 13:44:15 +0000 (+0100) Subject: argsplit(): Incorrect type used in sizeof calculation for array. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/af37e7c921540be0a53a0b6999f3d1cc95cc7527 argsplit(): Incorrect type used in sizeof calculation for array. Switched to referring to the variable being assigned the resulting memory rather than duplicating its type information. Fixes 78211e93. --- diff --git a/sbr/arglist.c b/sbr/arglist.c index cd88b86b..ceac3f1a 100644 --- a/sbr/arglist.c +++ b/sbr/arglist.c @@ -50,7 +50,7 @@ argsplit(char *command, char **file, int *argp) } } - argvarray = (char **) mh_xmalloc((sizeof(char **) * (MAXARGS + 5))); + argvarray = (char **)mh_xmalloc(sizeof *argvarray * (MAXARGS + 5)); /* * The simple case - no spaces or shell metacharacters