merge fixes

pull/635/head
Joran Honig 6 years ago
parent c8e4aef7cd
commit 9fe0964f35
  1. 2
      mythril/analysis/report.py
  2. 2
      mythril/disassembler/asm.py
  3. 5
      mythril/disassembler/disassembly.py
  4. 1
      requirements.txt
  5. 2
      tests/testdata/outputs_expected/overflow.sol.o.json
  6. 4
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  7. 4
      tests/testdata/outputs_expected/overflow.sol.o.text
  8. 2
      tests/testdata/outputs_expected/underflow.sol.o.json
  9. 4
      tests/testdata/outputs_expected/underflow.sol.o.markdown
  10. 4
      tests/testdata/outputs_expected/underflow.sol.o.text

@ -2,7 +2,7 @@ import logging
import json
import operator
from jinja2 import PackageLoader, Environment
import sha3
import _pysha3 as sha3
import hashlib
class Issue:

@ -23,7 +23,7 @@ class EvmInstruction:
return result
def instruction_list_to_easm(instruction_list: dict) -> str:
def instruction_list_to_easm(instruction_list: list) -> str:
result = ""
for instruction in instruction_list:

@ -1,4 +1,5 @@
from mythril.ether import asm, util
from mythril.ether import util
from mythril.disassembler import asm
from mythril.support.signatures import SignatureDb
import logging
@ -33,7 +34,7 @@ class Disassembly(object):
)
# Need to take from PUSH1 to PUSH4 because solc seems to remove excess 0s at the beginning for optimizing
jump_table_indices = asm.find_opcode_sequence(
jump_table_indices = asm.find_op_code_sequence(
[("PUSH1", "PUSH2", "PUSH3", "PUSH4"), ("EQ",)], self.instruction_list
)

@ -25,3 +25,4 @@ requests
rlp>=1.0.1
transaction>=2.2.1
z3-solver>=4.5
pysha3

@ -1 +1 @@
{"error": null, "issues": [{"address": 567, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The subtraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 649, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The subtraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 725, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The arithmetic operation can result in integer overflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Overflow", "type": "Warning"}], "success": true}
{"error": null, "issues": [{"address": 567, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The substraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 649, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The substraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 725, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The arithmetic operation can result in integer overflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Overflow", "type": "Warning"}], "success": true}

@ -9,7 +9,7 @@
### Description
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
## Integer Underflow
- SWC ID: 101
@ -20,7 +20,7 @@ The subtraction can result in an integer underflow.
### Description
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
## Integer Overflow
- SWC ID: 101

@ -4,7 +4,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 567
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
--------------------
@ -14,7 +14,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 649
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
--------------------

@ -1 +1 @@
{"error": null, "issues": [{"address": 567, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The subtraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 649, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The subtraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 725, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The arithmetic operation can result in integer overflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Overflow", "type": "Warning"}], "success": true}
{"error": null, "issues": [{"address": 567, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The substraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 649, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The substraction can result in an integer underflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Underflow", "type": "Warning"}, {"address": 725, "contract": "Unknown", "debug": "<DEBUG-DATA>", "description": "The arithmetic operation can result in integer overflow.\n", "function": "sendeth(address,uint256)", "swc_id": "101", "title": "Integer Overflow", "type": "Warning"}], "success": true}

@ -9,7 +9,7 @@
### Description
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
## Integer Underflow
- SWC ID: 101
@ -20,7 +20,7 @@ The subtraction can result in an integer underflow.
### Description
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
## Integer Overflow
- SWC ID: 101

@ -4,7 +4,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 567
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
--------------------
@ -14,7 +14,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 649
The subtraction can result in an integer underflow.
The substraction can result in an integer underflow.
--------------------

Loading…
Cancel
Save