From 84fd94949e14fd259f20aaa262de269a6cd804f0 Mon Sep 17 00:00:00 2001 From: Rakholiya Jenish Date: Sat, 16 Jan 2016 11:54:41 +0530 Subject: [PATCH] Correct the conversion of mem2chunk --- pwndbg/malloc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwndbg/malloc.py b/pwndbg/malloc.py index 1ed36c799..9e0d379d4 100644 --- a/pwndbg/malloc.py +++ b/pwndbg/malloc.py @@ -22,4 +22,4 @@ def chunk2mem(p): def mem2chunk(mem): "conversion from user pointer to malloc header" - return p + (2-pwndbg.arch.ptrsize) + return mem - (2*pwndbg.arch.ptrsize)