From f04e7bdef17291166a6b4cc797fcc78b606c7e14 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Sun, 14 Jun 2015 17:56:02 -0400 Subject: [PATCH] Fix infinite loop on qemu-user --- pwndbg/auxv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pwndbg/auxv.py b/pwndbg/auxv.py index 08becf36d..c4bf63803 100644 --- a/pwndbg/auxv.py +++ b/pwndbg/auxv.py @@ -203,14 +203,14 @@ def walk_stack2(offset=0): # very end of ENVP (and perhaps ARGV if ENVP is empty). # # The highest value for the vector is AT_SYSINFO_EHDR, 33. - while int((p-2).dereference()) < 37: + while (p-2).dereference() < 37: p -= 2 # Scan them into our structure auxv = AUXV() while True: - const = int((p+0).dereference()) - value = int((p+1).dereference()) + const = int((p+0).dereference()) & pwndbg.arch.ptrmask + value = int((p+1).dereference()) & pwndbg.arch.ptrmask if const == AT_NULL: break