Mismatching calldata in _crossTransferWithCalldata(...) and xReceive(...) in ConnextRouter
Description
Users can bridge assets by inserting an Action.XTransferWithCall action, with calldata specified in the args field. The calldata in _crossTransferWithCalldata(...) and _getBeneficiaryFromCalldata(...) is decoded as :
(Action[] memory actions, bytes[] memory args,) = abi.decode(callData, (Action[], bytes[], uint256));Whereas in xReceive(...), it lacks the last uint256:
(Action[] memory actions, bytes[] memory args) = abi.decode(callData, (Action[], bytes[]));Recommendation
Remove the last uint256 parameter from being decoded, as it is not being used.
POC
Status
Addressed here: Fujicracy/fuji-v2#651