winedbg: Ensure thread->name is null-terminated.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ce07be1a79
commit
3c2c443796
|
@ -257,9 +257,12 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
|
|||
dbg_printf("Thread ID=%04lx not in our list of threads -> can't rename\n", pThreadName->dwThreadID);
|
||||
return DBG_CONTINUE;
|
||||
}
|
||||
if (dbg_read_memory(pThreadName->szName, pThread->name, 9))
|
||||
dbg_printf("Thread ID=%04lx renamed using MS VC6 extension (name==\"%.9s\")\n",
|
||||
if (dbg_read_memory(pThreadName->szName, pThread->name, sizeof(pThread->name)))
|
||||
{
|
||||
pThread->name[sizeof(pThread->name) - 1] = '\0';
|
||||
dbg_printf("Thread ID=%04lx renamed using MSVC extension (name==\"%s\")\n",
|
||||
pThread->tid, pThread->name);
|
||||
}
|
||||
return DBG_CONTINUE;
|
||||
case EXCEPTION_INVALID_HANDLE:
|
||||
return DBG_CONTINUE;
|
||||
|
|
Loading…
Reference in New Issue