viv: insn: derefs: fix exception

This commit is contained in:
William Ballenthin
2020-08-14 09:37:51 -06:00
parent 90cdef5232
commit 6e525a93d7

View File

@@ -165,7 +165,12 @@ def derefs(vw, p):
return
yield p
next = vw.readMemoryPtr(p)
try:
next = vw.readMemoryPtr(p)
except Exception:
# if not enough bytes can be read, such as end of the section.
# unfortunately, viv returns a plain old generic `Exception` for this.
return
# sanity: pointer points to self
if next == p: