ntdll: Prevent NULL dereference in NtSuspendThread.

Overwatch calls NtSuspendThread directly, and expects to be able to pass in a
NULL pointer for the count argument.

Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Wesie 2017-02-03 04:20:39 -06:00 committed by Alexandre Julliard
parent e829de27fd
commit a39d67d8c9

View file

@ -632,7 +632,10 @@ NTSTATUS WINAPI NtSuspendThread( HANDLE handle, PULONG count )
SERVER_START_REQ( suspend_thread )
{
req->handle = wine_server_obj_handle( handle );
if (!(ret = wine_server_call( req ))) *count = reply->count;
if (!(ret = wine_server_call( req )))
{
if (count) *count = reply->count;
}
}
SERVER_END_REQ;
return ret;
@ -650,7 +653,10 @@ NTSTATUS WINAPI NtResumeThread( HANDLE handle, PULONG count )
SERVER_START_REQ( resume_thread )
{
req->handle = wine_server_obj_handle( handle );
if (!(ret = wine_server_call( req ))) *count = reply->count;
if (!(ret = wine_server_call( req )))
{
if (count) *count = reply->count;
}
}
SERVER_END_REQ;
return ret;