From c2dd6a0c6a2aee17e9f9f07f8a2a24e2efbbac39 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 18 Jun 2021 18:34:49 +0200 Subject: Small fixes to the my_backtrace (it doesn't seems to be working anyway) --- src/wrapped/wrappedlibc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index de61339c..94d7d761 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2336,7 +2336,7 @@ EXPORT int my_backtrace(x64emu_t* emu, void** buffer, int size) } int idx=0; while(idx=stack_end) || (fp<=stack_start)) + if(!fp || (fp+sizeof(void*)>=stack_end) || (fp<=stack_start)) return idx; buffer[idx] = (void*)fp[1]; fp = (uintptr_t*)fp[0]; -- cgit 1.4.1