Merge pull request #296 from norhh/branch/295

Remove extra space in integer overflow output field
pull/299/head
Nikhil Parasaram 7 years ago committed by GitHub
commit 6428d9b8cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mythril/analysis/modules/integer.py
  2. 4
      tests/testdata/outputs_expected/ether_send.sol.json
  3. 4
      tests/testdata/outputs_expected/ether_send.sol.o.json
  4. 2
      tests/testdata/outputs_expected/ether_send.sol.o.markdown
  5. 2
      tests/testdata/outputs_expected/ether_send.sol.o.text
  6. 4
      tests/testdata/outputs_expected/metacoin.sol.o.json
  7. 2
      tests/testdata/outputs_expected/metacoin.sol.o.markdown
  8. 2
      tests/testdata/outputs_expected/metacoin.sol.o.text
  9. 4
      tests/testdata/outputs_expected/overflow.sol.json
  10. 2
      tests/testdata/outputs_expected/overflow.sol.markdown
  11. 4
      tests/testdata/outputs_expected/overflow.sol.o.json
  12. 2
      tests/testdata/outputs_expected/overflow.sol.o.markdown
  13. 2
      tests/testdata/outputs_expected/overflow.sol.o.text
  14. 2
      tests/testdata/outputs_expected/overflow.sol.text
  15. 4
      tests/testdata/outputs_expected/underflow.sol.json
  16. 2
      tests/testdata/outputs_expected/underflow.sol.markdown
  17. 4
      tests/testdata/outputs_expected/underflow.sol.o.json
  18. 2
      tests/testdata/outputs_expected/underflow.sol.o.markdown
  19. 2
      tests/testdata/outputs_expected/underflow.sol.o.text
  20. 2
      tests/testdata/outputs_expected/underflow.sol.text

@ -83,9 +83,9 @@ def _check_integer_overflow(statespace, state, node):
if not _verify_integer_overflow(statespace, node, expr, state, model, constraint, op0, op1):
return issues
# Build issue
issue = Issue(node.contract_name, node.function_name, instruction['address'], "Integer Overflow ", "Warning")
issue = Issue(node.contract_name, node.function_name, instruction['address'], "Integer Overflow", "Warning")
issue.description = "A possible integer overflow exists in the function `{}`.\n" \
"The addition or multiplication may result in a value higher than the maximum representable integer.".format(

@ -14,7 +14,7 @@
"code": "msg.sender.transfer(this.balance)"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "invest()",
"type": "Warning",
@ -25,4 +25,4 @@
"code": "balances[msg.sender] += msg.value"
}
]
}
}

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `invest()`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "invest()",
"type": "Warning",
@ -19,4 +19,4 @@
"debug": "<DEBUG-DATA>"
}
]
}
}

@ -13,7 +13,7 @@ In the function `withdrawfunds()` a non-zero amount of Ether is sent to msg.send
There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`.
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Unknown

@ -8,7 +8,7 @@ In the function `withdrawfunds()` a non-zero amount of Ether is sent to msg.send
There is a check on storage index 1. This storage slot can be written to by calling the function `crowdfunding()`.
--------------------
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: invest()

@ -3,7 +3,7 @@
"error": null,
"issues": [
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `sendToken(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendToken(address,uint256)",
"type": "Warning",
@ -11,4 +11,4 @@
"debug": "<DEBUG-DATA>"
}
]
}
}

@ -1,6 +1,6 @@
# Analysis results for test-filename.sol
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Unknown

@ -1,4 +1,4 @@
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: sendToken(address,uint256)

@ -14,7 +14,7 @@
"code": "balances[msg.sender] -= _value"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)",
"type": "Warning",
@ -36,4 +36,4 @@
"code": "balances[msg.sender] - _value"
}
]
}
}

@ -17,7 +17,7 @@ In *<TESTDATA>/inputs/overflow.sol:12*
balances[msg.sender] -= _value
```
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Over

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)",
"type": "Warning",
@ -27,4 +27,4 @@
"debug": "<DEBUG-DATA>"
}
]
}
}

@ -24,7 +24,7 @@ The subtraction may result in a value < 0.
A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Unknown

@ -16,7 +16,7 @@ A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
--------------------
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)

@ -12,7 +12,7 @@ balances[msg.sender] -= _value
--------------------
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Over
Function name: sendeth(address,uint256)

@ -14,7 +14,7 @@
"code": "balances[msg.sender] -= _value"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)",
"type": "Warning",
@ -36,4 +36,4 @@
"code": "balances[msg.sender] - _value"
}
]
}
}

@ -17,7 +17,7 @@ In *<TESTDATA>/inputs/underflow.sol:12*
balances[msg.sender] -= _value
```
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Under

@ -11,7 +11,7 @@
"debug": "<DEBUG-DATA>"
},
{
"title": "Integer Overflow ",
"title": "Integer Overflow",
"description": "A possible integer overflow exists in the function `sendeth(address,uint256)`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.",
"function": "sendeth(address,uint256)",
"type": "Warning",
@ -27,4 +27,4 @@
"debug": "<DEBUG-DATA>"
}
]
}
}

@ -24,7 +24,7 @@ The subtraction may result in a value < 0.
A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
## Integer Overflow
## Integer Overflow
- Type: Warning
- Contract: Unknown

@ -16,7 +16,7 @@ A possible integer underflow exists in the function `sendeth(address,uint256)`.
The subtraction may result in a value < 0.
--------------------
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Unknown
Function name: sendeth(address,uint256)

@ -12,7 +12,7 @@ balances[msg.sender] -= _value
--------------------
==== Integer Overflow ====
==== Integer Overflow ====
Type: Warning
Contract: Under
Function name: sendeth(address,uint256)

Loading…
Cancel
Save