From 412d93acdddc2357c41e905a8f9fc19ef9de5f23 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 20 Jan 2025 12:09:21 +0100 Subject: [PATCH] Fix #23910 - Fix recent regression about invalid word size in dbt --- libr/debug/p/native/bt/fuzzy_all.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libr/debug/p/native/bt/fuzzy_all.c b/libr/debug/p/native/bt/fuzzy_all.c index 7f69405fa042f..6db57434bc953 100644 --- a/libr/debug/p/native/bt/fuzzy_all.c +++ b/libr/debug/p/native/bt/fuzzy_all.c @@ -36,19 +36,19 @@ static int iscallret(RDebug *dbg, ut64 addr) { } static RList *backtrace_fuzzy(RDebug *dbg, ut64 at) { - ut8 *stack, *ptr; - int wordsize = dbg->bits; // XXX, dbg->bits is wordsize not bits + ut8 *ptr; + const int wordsize = dbg->bits / 8; ut64 sp; RIOBind *bio = &dbg->iob; - int i, stacksize; + int i; ut64 *p64, addr = 0LL; ut32 *p32; ut16 *p16; ut64 cursp, oldsp; RList *list; - stacksize = 1024*512; // 512KB .. should get the size from the regions if possible - stack = malloc (stacksize); + const int stacksize = 1024 * 512; // 512KB .. should get the size from the regions if possible + ut8 *stack = malloc (stacksize); if (!stack) { return NULL; }