Skip to content

Commit b3d5990

Browse files
committed
unexpected attributes too short
1 parent 00c5054 commit b3d5990

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/crosschain/axelar/AxelarGatewaySource.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ abstract contract AxelarGatewaySource is IERC7786GatewaySource, AxelarGatewayBas
3030
bytes[] calldata attributes
3131
) external payable returns (bytes32) {
3232
require(msg.value == 0, "Value not supported");
33-
if (attributes.length > 0) revert UnsupportedAttribute(bytes4(attributes[0][0:4]));
33+
if (attributes.length > 0)
34+
revert UnsupportedAttribute(attributes[0].length < 0x04 ? bytes4(0) : bytes4(attributes[0][0:4]));
3435

3536
// Create the package
3637
string memory sender = msg.sender.toChecksumHexString();

0 commit comments

Comments
 (0)