mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
process: allow NULL options
The process options structure should be allowed to be `NULL`; treated as if it's empty.
This commit is contained in:
@@ -204,7 +204,9 @@ extern int git_process_new_from_cmdline(
|
||||
{
|
||||
git_process_options merged_opts = {0};
|
||||
|
||||
memcpy(&merged_opts, opts, sizeof(git_process_options));
|
||||
if (opts)
|
||||
memcpy(&merged_opts, opts, sizeof(git_process_options));
|
||||
|
||||
merged_opts.use_shell = 1;
|
||||
|
||||
return git_process_new(out, &cmdline, 1, env, env_len, &merged_opts);
|
||||
|
||||
Reference in New Issue
Block a user