Rémi Bernon : winedbg: Don't dereference possibly NULL thread pointer.
Alexandre Julliard
julliard at winehq.org
Mon Jun 7 15:02:07 CDT 2021
Module: wine
Branch: stable
Commit: 75158894700090e7867132e787a6778089619962
URL: https://source.winehq.org/git/wine.git/?a=commit;h=75158894700090e7867132e787a6778089619962
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Mar 9 22:54:55 2021 +0100
winedbg: Don't dereference possibly NULL thread pointer.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 6eff0342ad6f8c262112e6aeb083bb386d37cf04)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
programs/winedbg/gdbproxy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c
index c51fd342496..392502032e8 100644
--- a/programs/winedbg/gdbproxy.c
+++ b/programs/winedbg/gdbproxy.c
@@ -111,11 +111,11 @@ struct gdb_context
static void gdbctx_delete_xpoint(struct gdb_context *gdbctx, struct dbg_thread *thread,
dbg_ctx_t *ctx, struct gdb_xpoint *x)
{
- struct dbg_process *process = thread->process;
+ struct dbg_process *process = gdbctx->process;
struct backend_cpu *cpu = process->be_cpu;
if (!cpu->remove_Xpoint(process->handle, process->process_io, ctx, x->type, x->addr, x->value, x->size))
- ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread->tid, x->addr, x->size, x->type);
+ ERR("%04x:%04x: Couldn't remove breakpoint at:%p/%x type:%d\n", process->pid, thread ? thread->tid : ~0, x->addr, x->size, x->type);
list_remove(&x->entry);
HeapFree(GetProcessHeap(), 0, x);
More information about the wine-cvs
mailing list