Commit 7332de64 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

server: Validate status in continue_debug_event.

parent d604fdbd
......@@ -1000,6 +1000,10 @@ static void test_debugger(void)
continuestatus = DBG_CONTINUE;
ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n");
ret = ContinueDebugEvent(de.dwProcessId, de.dwThreadId, 0xdeadbeef);
ok(!ret, "ContinueDebugEvent unexpectedly succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Unexpected last error: %u\n", GetLastError());
if (de.dwThreadId != pi.dwThreadId)
{
trace("event %d not coming from main thread, ignoring\n", de.dwDebugEventCode);
......
......@@ -612,8 +612,16 @@ DECL_HANDLER(wait_debug_event)
/* Continue a debug event */
DECL_HANDLER(continue_debug_event)
{
struct process *process = get_process_from_id( req->pid );
if (process)
struct process *process;
if (req->status != DBG_EXCEPTION_NOT_HANDLED &&
req->status != DBG_CONTINUE)
{
set_error( STATUS_INVALID_PARAMETER );
return;
}
if ((process = get_process_from_id( req->pid )))
{
struct thread *thread = get_thread_from_id( req->tid );
if (thread)
......
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