diff options
author | midipix <writeonce@midipix.org> | 2017-10-07 03:01:41 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-10-08 00:01:07 -0400 |
commit | c0326715a29563dd6bea9d922a32f9ec2170c1b7 (patch) | |
tree | 011931eb3b76070ca029407ccc75c48e4fc7bc93 /src/process | |
parent | 2c5bbc3227abb53c9b51aa1fa9eafe7ab86d359a (diff) | |
download | ntapi-c0326715a29563dd6bea9d922a32f9ec2170c1b7.tar.bz2 ntapi-c0326715a29563dd6bea9d922a32f9ec2170c1b7.tar.xz |
__ntapi_tt_spawn_native_process(): properly handle a null sparams->patharg.
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/ntapi_tt_spawn_native_process.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/process/ntapi_tt_spawn_native_process.c b/src/process/ntapi_tt_spawn_native_process.c index 811c724..1458e78 100644 --- a/src/process/ntapi_tt_spawn_native_process.c +++ b/src/process/ntapi_tt_spawn_native_process.c @@ -95,11 +95,13 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar : peb->process_params->cwd_handle; /* patharg */ - patharg = (sparams->patharg[0] == '/') - ? (sparams->patharg[1] == '?') - ? &sparams->patharg[0] - : &sparams->patharg[1] - : &sparams->patharg[0]; + patharg = sparams->patharg + ? (sparams->patharg[0] == '/') + ? (sparams->patharg[1] == '?') + ? &sparams->patharg[0] + : &sparams->patharg[1] + : &sparams->patharg[0] + : 0; /* rtblock, rdata */ rtblock.addr = 0; |