ntdll: Check for DLL files when creating new processes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50912 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6d5a6c3466
commit
89db25afda
|
@ -1917,7 +1917,11 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params(void)
|
|||
env[env_pos++] = 0;
|
||||
|
||||
status = load_main_exe( NULL, main_argv[1], curdir, &image, &module, &image_info );
|
||||
if (!status && image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
if (!status)
|
||||
{
|
||||
if (image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
if (image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
}
|
||||
|
||||
if (status) /* try launching it through start.exe */
|
||||
{
|
||||
|
|
|
@ -365,6 +365,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, HANDLE *handle, pe_image
|
|||
}
|
||||
SERVER_END_REQ;
|
||||
NtClose( mapping );
|
||||
if (info->image_charact & IMAGE_FILE_DLL) return STATUS_INVALID_IMAGE_FORMAT;
|
||||
}
|
||||
else if (status == STATUS_INVALID_IMAGE_NOT_MZ)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue