Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 20:04:39 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-01 20:04:39 +0300
commit9da394878174b1197844f90a2f085443e72203cb (patch)
tree9b74abc20dc3d8da4764ad290a56583ccc4da3c3 /compat
parent406ca29e0d660f8ba99a783cb207c53359f870cc (diff)
parent51bd6be32dfcb638727d89816a69ef13717ab17c (diff)
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.c2
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) {