winedbg: Sanity check the dwType field of MSVC thread naming exceptions.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
24c10e700c
commit
ce07be1a79
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue