Skip to content

Commit

Permalink
Merge pull request OpenZeppelin#377 from yaronvel/master
Browse files Browse the repository at this point in the history
fix for issue 375: transferFrom allows sending to self more than self balance
  • Loading branch information
frangio authored Aug 19, 2017
2 parents 98ad712 + cea752d commit dd9fdaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/token/StandardToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ contract StandardToken is ERC20, BasicToken {
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);

balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
return true;
Expand Down

0 comments on commit dd9fdaf

Please sign in to comment.