diff --git a/pwndbg/enhance.py b/pwndbg/enhance.py index b98bd33b0..70fb18018 100644 --- a/pwndbg/enhance.py +++ b/pwndbg/enhance.py @@ -106,6 +106,10 @@ def enhance(value, code = True): if szval: szval = E.string(repr(szval)) + # Fix for case we can't read the end address anyway (#946) + if value + pwndbg.arch.ptrsize > page.end: + return E.integer(int_str(value)) + intval = int(pwndbg.memory.poi(pwndbg.typeinfo.pvoid, value)) intval0 = intval if 0 <= intval < 10: