Commit 4ece7d40 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Don't return image information for a terminated process.

parent 3c9b5379
......@@ -4207,9 +4207,7 @@ static void test_dead_process(void)
memset( &image, 0xcc, sizeof(image) );
status = NtQueryInformationProcess( pi.hProcess, ProcessImageInformation, &image, sizeof(image), NULL);
todo_wine
ok( status == STATUS_PROCESS_IS_TERMINATING, "ProcessImageInformation wrong error %x\n", status );
todo_wine
ok( image.Machine == 0xcccc, "ProcessImageInformation info modified\n" );
while ((status = NtQuerySystemInformation(SystemProcessInformation, buffer, size, &size)) == STATUS_INFO_LENGTH_MISMATCH)
......
......@@ -1361,8 +1361,12 @@ DECL_HANDLER(get_process_info)
client_ptr_t base;
const pe_image_info_t *info;
struct memory_view *view = get_exe_view( process );
if (view && (info = get_view_image_info( view, &base )))
set_reply_data( info, min( sizeof(*info), get_reply_max_size() ));
if (view)
{
if ((info = get_view_image_info( view, &base )))
set_reply_data( info, min( sizeof(*info), get_reply_max_size() ));
}
else set_error( STATUS_PROCESS_IS_TERMINATING );
}
release_object( process );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment