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
This commit is contained in:
commit
9da3948781
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user