server: Validate status in continue_debug_event.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d604fdbdd1
commit
7332de64a5
|
@ -1000,6 +1000,10 @@ static void test_debugger(void)
|
||||||
continuestatus = DBG_CONTINUE;
|
continuestatus = DBG_CONTINUE;
|
||||||
ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n");
|
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)
|
if (de.dwThreadId != pi.dwThreadId)
|
||||||
{
|
{
|
||||||
trace("event %d not coming from main thread, ignoring\n", de.dwDebugEventCode);
|
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 */
|
/* Continue a debug event */
|
||||||
DECL_HANDLER(continue_debug_event)
|
DECL_HANDLER(continue_debug_event)
|
||||||
{
|
{
|
||||||
struct process *process = get_process_from_id( req->pid );
|
struct process *process;
|
||||||
if (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 );
|
struct thread *thread = get_thread_from_id( req->tid );
|
||||||
if (thread)
|
if (thread)
|
||||||
|
|
Loading…
Reference in New Issue