From b7c0fe875175e28f6d0806067b59fafd9fee065f Mon Sep 17 00:00:00 2001 From: andigena Date: Wed, 12 Oct 2016 18:31:53 +0200 Subject: [PATCH] Avoid infinite loop on 0-sized chunks in heap command (#124) --- pwndbg/commands/heap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwndbg/commands/heap.py b/pwndbg/commands/heap.py index 0d1750bdb..24712eb55 100755 --- a/pwndbg/commands/heap.py +++ b/pwndbg/commands/heap.py @@ -80,6 +80,8 @@ def heap(addr=None): # Clear the bottom 3 bits size &= ~7 + if size == 0: + break addr += size @pwndbg.commands.ParsedCommand