Commit ecbfcbb3 by Manuel Aráoz Committed by GitHub

Merge pull request #221 from TokenMarketNet/feat/transfer-from-mitigation

Protect transferFrom() against short hand attack.
parents 5c491987 964185de
...@@ -16,7 +16,7 @@ contract StandardToken is BasicToken, ERC20 { ...@@ -16,7 +16,7 @@ contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) allowed; mapping (address => mapping (address => uint)) allowed;
function transferFrom(address _from, address _to, uint _value) { function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
var _allowance = allowed[_from][msg.sender]; var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment