Merge branch 'develop' of github.com:ConsenSys/mythril into hotfix/solc-version-binary

pull/653/head
Nikhil Parasaram 6 years ago
commit 9dcfe53da0
  1. 4
      mythril/analysis/modules/dependence_on_predictable_vars.py
  2. 2
      mythril/analysis/modules/integer.py
  3. 2
      tests/testdata/outputs_expected/overflow.sol.o.json
  4. 4
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  5. 4
      tests/testdata/outputs_expected/overflow.sol.o.text
  6. 2
      tests/testdata/outputs_expected/underflow.sol.o.json
  7. 4
      tests/testdata/outputs_expected/underflow.sol.o.markdown
  8. 4
      tests/testdata/outputs_expected/underflow.sol.o.text

@ -66,7 +66,7 @@ def execute(statespace):
function_name=call.node.function_name,
address=address,
swc_id=swc_type,
bytecode=state.environment.code.bytecode,
bytecode=call.state.environment.code.bytecode,
title="Dependence on predictable environment variable",
_type="Warning",
description=description,
@ -144,7 +144,7 @@ def execute(statespace):
contract=call.node.contract_name,
function_name=call.node.function_name,
address=address,
bytecode=state.environment.code.bytecode,
bytecode=call.state.environment.code.bytecode,
title="Dependence on predictable variable",
_type="Informational",
description=description,

@ -210,7 +210,7 @@ def _check_integer_underflow(statespace, state, node):
)
issue.description = (
"The substraction can result in an integer underflow.\n"
"The subtraction can result in an integer underflow.\n"
)
issue.debug = "Transaction Sequence: " + str(

@ -1 +1 @@
{"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}
{"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}

@ -9,7 +9,7 @@
### Description
The substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
## Integer Underflow
- SWC ID: 101
@ -20,7 +20,7 @@ The substraction can result in an integer underflow.
### Description
The substraction can result in an integer underflow.
The subtraction 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 substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
--------------------
@ -14,7 +14,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 649
The substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
--------------------

@ -1 +1 @@
{"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}
{"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}

@ -9,7 +9,7 @@
### Description
The substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
## Integer Underflow
- SWC ID: 101
@ -20,7 +20,7 @@ The substraction can result in an integer underflow.
### Description
The substraction can result in an integer underflow.
The subtraction 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 substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
--------------------
@ -14,7 +14,7 @@ Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)
PC address: 649
The substraction can result in an integer underflow.
The subtraction can result in an integer underflow.
--------------------

Loading…
Cancel
Save