server: Don't return image information for a terminated process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3c9b5379d1
commit
4ece7d409a
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue