You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pragma solidity 0.4.24;
contract game {
bool won = false;
function play() public {
if (!won) {
won = true;
msg.sender.transfer(1);
}
}
function play2() public {
require(!won);
won = true;
msg.sender.transfer(1);
}
}
play and play2 have different analysis results with regards to TODTransfer.
pragma solidity 0.4.24;
contract game {
bool won = false;
function play() public {
if (!won) {
won = true;
msg.sender.transfer(10 ** 18);
} else {
msg.sender.transfer(10 ** 18);
}
msg.sender.transfer(10 ** 18);
}
}
The last transfer is also tagged as TODTransfer. It is unclear whether that is desirable or not.
The text was updated successfully, but these errors were encountered:
Reference:
securify/src/test/java/ch/securify/patterns/TODTransferTest.java
Line 36 in 604fb57
Additional examples:
play
andplay2
have different analysis results with regards toTODTransfer
.The last
transfer
is also tagged asTODTransfer
. It is unclear whether that is desirable or not.The text was updated successfully, but these errors were encountered: