fixing the check condition of hexdump (#2838)

pull/2839/head
davi 8 months ago committed by GitHub
parent 8ffba2ebce
commit c39f171c4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -77,9 +77,6 @@ def hexdump(address, count=pwndbg.config.hexdump_bytes) -> None:
hexdump.offset = 0
address = int(address)
if not pwndbg.aglib.memory.peek(address):
print("Could not read memory at specified address")
return
if address > pwndbg.aglib.arch.ptrmask:
new_address = address & pwndbg.aglib.arch.ptrmask
print(
@ -89,6 +86,10 @@ def hexdump(address, count=pwndbg.config.hexdump_bytes) -> None:
)
address = new_address
if not pwndbg.aglib.memory.peek(address):
print("Could not read memory at specified address")
return
count = max(int(count), 0)
# Get the configured limit in MB

Loading…
Cancel
Save