From 2bef07faa0be17b639d3f30575e8c7971a492fd9 Mon Sep 17 00:00:00 2001 From: cnwangjihe Date: Sat, 28 Aug 2021 15:58:12 +0000 Subject: [PATCH] Fix __libc_malloc_initialized not found in glibc 2.34 --- pwndbg/heap/ptmalloc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwndbg/heap/ptmalloc.py b/pwndbg/heap/ptmalloc.py index 997a9844f..796acff12 100644 --- a/pwndbg/heap/ptmalloc.py +++ b/pwndbg/heap/ptmalloc.py @@ -549,6 +549,8 @@ class Heap(pwndbg.heap.heap.BaseHeap): def is_initialized(self): addr = pwndbg.symbol.address('__libc_malloc_initialized') + if addr is None: + addr = pwndbg.symbol.address('__malloc_initialized') return pwndbg.memory.s32(addr) > 0 def libc_has_debug_syms(self):