Peter Oberndorfer : winedbg: Don'
t try to read to invalid memory if winedbg does not find the thread.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 2 15:00:46 CDT 2006
Module: wine
Branch: master
Commit: b480668942e6687091fd4065e2f36917504b8c28
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b480668942e6687091fd4065e2f36917504b8c28
Author: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Thu Sep 28 19:50:03 2006 +0200
winedbg: Don't try to read to invalid memory if winedbg does not find the thread.
---
programs/winedbg/tgt_active.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index af619a0..8dbca97 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -255,7 +255,11 @@ static DWORD dbg_handle_exception(const
pThread = dbg_curr_thread;
else
pThread = dbg_get_thread(dbg_curr_process, pThreadName->dwThreadID);
-
+ if(!pThread)
+ {
+ dbg_printf("Thread ID=0x%lx 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=0x%lx renamed using MS VC6 extension (name==\"%s\")\n",
pThread->tid, pThread->name);
More information about the wine-cvs
mailing list