Disassembler: prevent duplicate edges

pull/2/head 0.3.9
Bernhard Mueller 7 years ago
parent 0a4b8dc13b
commit 9006ebad1e
  1. 7
      mythril/disassembler/disassembly.py
  2. 2
      setup.py

@ -114,12 +114,15 @@ class Disassembly:
except IndexError:
continue
self.xrefs.append((block.id, self.blocks[j].id))
if not (block.id, self.blocks[j].id) in self.xrefs:
self.xrefs.append((block.id, self.blocks[j].id))
# if the last instruction isn't an unconditional jump or halt, also add a reference to the following block
if (block.id < len(self.blocks)) and (block.instruction_list[block.length - 1]['opcode'] not in ['JUMP', 'STOP', 'THROW', 'REVERT', 'INVALID']):
self.xrefs.append((block.id, block.id + 1))
if not (block.id, self.blocks[j].id) in self.xrefs:
self.xrefs.append((block.id, block.id + 1))
def get_easm(self):

@ -219,7 +219,7 @@ security community.
setup(
name='mythril',
version='0.3.8',
version='0.3.9',
description='A reversing and bug hunting framework for the Ethereum blockchain',
long_description=long_description,

Loading…
Cancel
Save