Merge pull request #649 from JoranHonig/bugfix/typo

subtraction typo fix
pull/648/head
JoranHonig 6 years ago committed by GitHub
commit 7e1f377df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      mythril/analysis/modules/integer.py
  2. 2
      tests/testdata/outputs_expected/overflow.sol.o.json
  3. 4
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  4. 4
      tests/testdata/outputs_expected/overflow.sol.o.text
  5. 2
      tests/testdata/outputs_expected/underflow.sol.o.json
  6. 4
      tests/testdata/outputs_expected/underflow.sol.o.markdown
  7. 4
      tests/testdata/outputs_expected/underflow.sol.o.text

@ -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