about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c2
1 files changed, 1 insertions, 1 deletions
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<size) {
-        if(!fp || (fp>=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];