Skip to content

Commit

Permalink
Fix heap commands when the glibc arena has not set all expected members
Browse files Browse the repository at this point in the history
  • Loading branch information
theguy147 authored and Grazfather committed Jul 31, 2021
1 parent 44b00a8 commit dddb7bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,12 +750,14 @@ def __init__(self, addr, name=None):
except:
self.__arena = MallocStateStruct(addr)
self.__addr = self.__arena.addr
finally:
try:
self.top = int(self.top)
self.last_remainder = int(self.last_remainder)
self.n = int(self.next)
self.nfree = int(self.next_free)
self.sysmem = int(self.system_mem)
except gdb.error as e:
err("Glibc arena: {}".format(e))
return

def __getitem__(self, item):
Expand Down

0 comments on commit dddb7bf

Please sign in to comment.