We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analysing with the latest Docker version a simple HelloWorld contract. The analysis reports some false positive for string variable assignments
// SPDX-License-Identifier: MIT pragma solidity >=0.7.3; contract HelloWorld { event UpdatedMessages(string oldStr, string newStr); string public message; constructor(string memory initMessage) { message = initMessage; } function update(string memory newMessage) public { string memory oldMsg = message; message = newMessage; emit UpdatedMessages(oldMsg, newMessage); } }
In the report:
==== Integer Arithmetic Bugs ==== SWC ID: 101 Severity: High Contract: HelloWorld Function name: update(string) PC address: 395 Estimated Gas Usage: 21046 - 86946 The arithmetic operator can underflow. It is possible to cause an integer overflow or underflow in the arithmetic operation. -------------------- In file: /tmp/HelloWorld.sol:28 string memory oldMsg = message -------------------- Initial State: Account: [CREATOR], balance: 0x0, nonce:0, storage:{} Account: [ATTACKER], balance: 0x0, nonce:0, storage:{} Transaction Sequence:
-->
I suppose there no problem with the Solidity code
Mythril in Docker Mythril version v0.23.17
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Analysing with the latest Docker version a simple HelloWorld contract.
The analysis reports some false positive for string variable assignments
How to Reproduce
In the report:
-->
Expected behavior
I suppose there no problem with the Solidity code
Environment
Mythril in Docker
Mythril version v0.23.17
The text was updated successfully, but these errors were encountered: