Commit a39d67d8 authored by Andrew Wesie's avatar Andrew Wesie Committed by Alexandre Julliard

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: 's avatarAndrew Wesie <awesie@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e829de27
......@@ -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;
......
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