aboutsummaryrefslogtreecommitdiffstats
path: root/docs/security-considerations.rst
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-07-03 18:04:41 +0800
committerGitHub <noreply@github.com>2018-07-03 18:04:41 +0800
commit09f3532ea961198d07e9b2b54ceefd6368d74770 (patch)
tree20ff43c352b56c1b6e7645351c4811b30c70c907 /docs/security-considerations.rst
parent4649f9202a93f7573d7fb425fbcbdd50e6d4407c (diff)
parent0b5dd7320afb751c58348619dd67ef4f77afeb41 (diff)
downloaddexon-solidity-09f3532ea961198d07e9b2b54ceefd6368d74770.tar.gz
dexon-solidity-09f3532ea961198d07e9b2b54ceefd6368d74770.tar.zst
dexon-solidity-09f3532ea961198d07e9b2b54ceefd6368d74770.zip
Merge pull request #4274 from ethereum/v050-var-keyword-removal-v2
[BREAKING] var keyword removal
Diffstat (limited to 'docs/security-considerations.rst')
-rw-r--r--docs/security-considerations.rst3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index c8d8c30b..afdecb98 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -103,7 +103,7 @@ outlined further below:
mapping(address => uint) shares;
/// Withdraw your share.
function withdraw() public {
- var share = shares[msg.sender];
+ uint share = shares[msg.sender];
shares[msg.sender] = 0;
msg.sender.transfer(share);
}
@@ -224,7 +224,6 @@ If your wallet had checked ``msg.sender`` for authorization, it would get the ad
Minor Details
=============
-- In ``for (var i = 0; i < arrayName.length; i++) { ... }``, the type of ``i`` will be ``uint8``, because this is the smallest type that is required to hold the value ``0``. If the array has more than 255 elements, the loop will not terminate.
- Types that do not occupy the full 32 bytes might contain "dirty higher order bits".
This is especially important if you access ``msg.data`` - it poses a malleability risk:
You can craft transactions that call a function ``f(uint8 x)`` with a raw byte argument