From f8f0f57b29aae65c48ae0fe4fb577fe8cd67ac68 Mon Sep 17 00:00:00 2001 From: ron Date: Thu, 22 Feb 2024 10:41:51 +0800 Subject: [PATCH] Check call length --- contracts/src/Gateway.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/Gateway.sol b/contracts/src/Gateway.sol index e50f31d8e5..9a3e90cd3f 100644 --- a/contracts/src/Gateway.sol +++ b/contracts/src/Gateway.sol @@ -630,7 +630,7 @@ contract Gateway is IGateway, IInitializable { Weight calldata weightAtMost, bytes calldata call ) external payable { - if (call.length == 0 || destinationFee == 0 || weightAtMost.refTime == 0 || weightAtMost.proofSize == 0) { + if (call.length < 2 || destinationFee == 0 || weightAtMost.refTime == 0 || weightAtMost.proofSize == 0) { revert InvalidTransact(); } Ticket memory ticket;