diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tty/ntapi_tty_create_session.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/tty/ntapi_tty_create_session.c b/src/tty/ntapi_tty_create_session.c index 97e8a22..c152185 100644 --- a/src/tty/ntapi_tty_create_session.c +++ b/src/tty/ntapi_tty_create_session.c @@ -31,7 +31,7 @@ int32_t __stdcall __ntapi_tty_create_session( __in nt_tty_session_type type, __in nt_tty_session_subtype subtype, __in const nt_guid * guid __optional, - __in wchar16_t * image_name __optional, + __in wchar16_t * image_name, __in void * htty __optional) { nt_status status; @@ -47,14 +47,9 @@ int32_t __stdcall __ntapi_tty_create_session( nt_create_process_params params; nt_event_basic_information eready; - wchar16_t __attr_aligned__(8) __tty_image_name_fallback[] = { - '\\','?','?','\\', - 'C',':', - '\\','m','i','d','i','p','i','x', - '\\','b','i','n', - '\\','n','t','c','t','t','y', - '.','e','x','e', - 0}; + /* validate */ + if (!image_name) + return NT_STATUS_INVALID_PARAMETER; /* init */ __internals = __ntapi_internals(); @@ -76,9 +71,6 @@ int32_t __stdcall __ntapi_tty_create_session( if (!port_name) port_name = __internals->subsystem; - if (!image_name) - image_name = __tty_image_name_fallback; - break; case NT_TTY_SESSION_SECONDARY: @@ -91,9 +83,6 @@ int32_t __stdcall __ntapi_tty_create_session( if (!port_name) port_name = &sport_name; - if (!image_name) - image_name = __tty_image_name_fallback; - break; case NT_TTY_SESSION_PRIVATE: |