diff options
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/ntapi_tt_get_runtime_data.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/process/ntapi_tt_get_runtime_data.c b/src/process/ntapi_tt_get_runtime_data.c index 4513570..e5a7d55 100644 --- a/src/process/ntapi_tt_get_runtime_data.c +++ b/src/process/ntapi_tt_get_runtime_data.c @@ -23,11 +23,11 @@ static wchar16_t runtime_arg[20] = { int32_t __stdcall __ntapi_tt_get_runtime_data( __out nt_runtime_data ** rtdata, - __in wchar16_t ** argv) + __in wchar16_t ** wargv) { int32_t status; nt_process_parameters * process_params; - nt_cmd_option_meta_utf16 cmd_opt_meta; + wchar16_t * addrarg; nt_runtime_data buffer; nt_runtime_data * prtdata; ntapi_internals * __internals; @@ -41,22 +41,24 @@ int32_t __stdcall __ntapi_tt_get_runtime_data( return NT_STATUS_SUCCESS; } - if (!(argv = argv ? argv : __internals->ntapi_img_sec_bss->argv_envp_array)) + if (!(wargv = wargv ? wargv : __internals->ntapi_img_sec_bss->argv_envp_array)) return NT_STATUS_INVALID_PARAMETER_2; + if (!wargv[1] || !wargv[2]) + return NT_STATUS_MORE_PROCESSING_REQUIRED; + /* integral process? */ - if ((status = __ntapi->tt_get_short_option_meta_utf16( - __ntapi->tt_crc32_table(), - 'r', - argv, - &cmd_opt_meta))) - return status; + if ((wargv[1][0] == '-') && (wargv[1][1] == 'r') && (wargv[1][2] == 0)) + addrarg = wargv[2]; + else + return NT_STATUS_INVALID_PARAMETER; - else if (argv[3]) + if (!addrarg || wargv[3]) status = NT_STATUS_INVALID_PARAMETER_MIX; + /* obtain pointer to data block */ if ((status = __ntapi->tt_hex_utf16_to_uintptr( - cmd_opt_meta.value, + addrarg, (uintptr_t *)&prtdata))) return status; |