Commit ce07be1a authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

winedbg: Sanity check the dwType field of MSVC thread naming exceptions.

parent 24c10e70
......@@ -485,6 +485,8 @@ static BOOL handle_exception(struct gdb_context* gdbctx, EXCEPTION_DEBUG_INFO* e
char name[9];
SIZE_T read;
if (threadname->dwType != 0x1000)
return FALSE;
if (threadname->dwThreadID == -1)
thread = dbg_get_thread(gdbctx->process, gdbctx->de.dwThreadId);
else
......
......@@ -245,6 +245,9 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
break;
case EXCEPTION_WINE_NAME_THREAD:
pThreadName = (const THREADNAME_INFO*)(rec->ExceptionInformation);
if (pThreadName->dwType != 0x1000)
return DBG_EXCEPTION_NOT_HANDLED;
if (pThreadName->dwThreadID == -1)
pThread = dbg_curr_thread;
else
......
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