summaryrefslogtreecommitdiff
path: root/python/examples/jump_table.py
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2022-01-27 22:43:28 -0500
committerKyleMiles <krm504@nyu.edu>2022-01-28 00:24:06 -0500
commit6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch)
treedace4156d03148bcaf02df138ab4e0d93e61bc6f /python/examples/jump_table.py
parent519c9db22367f2659d1a54599fab47e6313be06e (diff)
Format All Files
Diffstat (limited to 'python/examples/jump_table.py')
-rw-r--r--python/examples/jump_table.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/examples/jump_table.py b/python/examples/jump_table.py
index 6ee60ce5..2132c950 100644
--- a/python/examples/jump_table.py
+++ b/python/examples/jump_table.py
@@ -50,13 +50,15 @@ def find_jump_table(bv, addr):
# Collect the branch targets for any tables referenced by the clicked instruction
branches = []
for token in tokens:
- if InstructionTextTokenType(token.type) == InstructionTextTokenType.PossibleAddressToken: # Table addresses will be a "possible address" token
+ if InstructionTextTokenType(
+ token.type
+ ) == InstructionTextTokenType.PossibleAddressToken: # Table addresses will be a "possible address" token
tbl = token.value
print("Found possible table at 0x%x" % tbl)
i = 0
while True:
# Read the next pointer from the table
- data = bv.read(tbl + (i * addrsize), addrsize)
+ data = bv.read(tbl + (i*addrsize), addrsize)
if len(data) == addrsize:
if addrsize == 4:
ptr = struct.unpack("<I", data)[0]