Skip to content

Commit

Permalink
fix: validate withdrawal id in gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
nxqbao committed Oct 16, 2023
1 parent eb7ed08 commit 610393f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/ronin/gateway/RoninGatewayV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ contract RoninGatewayV3 is
IBridgeTracking _bridgeTrackingContract = IBridgeTracking(getContract(ContractType.BRIDGE_TRACKING));
for (uint256 _i; _i < withdrawals.length; ) {
id = withdrawals[_i];

if (id == 0 || id > withdrawalCount) {
revert ErrInvalidRequest();
}

_withdrawalSig[id][operator] = signatures[_i];
_bridgeTrackingContract.recordVote(IBridgeTracking.VoteKind.Withdrawal, id, operator);

Expand Down

0 comments on commit 610393f

Please sign in to comment.