Skip to content

Commit

Permalink
Use SafeMath in getOffchainStorageRoots (#9026)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Nov 30, 2021
1 parent 31a58db commit d196b00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/common/Accounts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ contract Accounts is
uint256 numberRoots = offchainStorageRoots[account].length;
uint256 totalLength = 0;
for (uint256 i = 0; i < numberRoots; i++) {
totalLength += offchainStorageRoots[account][i].length;
totalLength = totalLength.add(offchainStorageRoots[account][i].length);
}

bytes memory concatenated = new bytes(totalLength);
Expand Down

0 comments on commit d196b00

Please sign in to comment.