diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-01 09:04:39 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-01 09:04:39 -0800 |
commit | 9da394878174b1197844f90a2f085443e72203cb (patch) | |
tree | 9b74abc20dc3d8da4764ad290a56583ccc4da3c3 /compat | |
parent | Merge branch 'rs/parse-options-dup-null-fix' (diff) | |
parent | mingw: use COPY_ARRAY for copying array (diff) | |
download | tgif-9da394878174b1197844f90a2f085443e72203cb.tar.xz |
Merge branch 'rs/use-copy-array-in-mingw-shell-command-preparation'
Code cleanup.
* rs/use-copy-array-in-mingw-shell-command-preparation:
mingw: use COPY_ARRAY for copying array
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index fe609239dd..2f4654c968 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1566,7 +1566,7 @@ static int try_shell_exec(const char *cmd, char *const *argv) while (argv[argc]) argc++; ALLOC_ARRAY(argv2, argc + 1); argv2[0] = (char *)cmd; /* full path to the script file */ - memcpy(&argv2[1], &argv[1], sizeof(*argv) * argc); + COPY_ARRAY(&argv2[1], &argv[1], argc); exec_id = trace2_exec(prog, argv2); pid = mingw_spawnv(prog, argv2, 1); if (pid >= 0) { |