From b54d56b550890a5fa63915153817c668831f09f7 Mon Sep 17 00:00:00 2001 From: Filipp Makarov Date: Tue, 26 Nov 2024 10:24:59 +0400 Subject: [PATCH] check limits --- contracts/lib/ExecLib.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/lib/ExecLib.sol b/contracts/lib/ExecLib.sol index 1d4b4630..d5046f92 100644 --- a/contracts/lib/ExecLib.sol +++ b/contracts/lib/ExecLib.sol @@ -43,6 +43,9 @@ library ExecLib { // Extract the ERC7579 Executions executionBatch.offset := add(dataPointer, 32) executionBatch.length := calldataload(dataPointer) + if slt(sub(callData.length, executionBatch.length), 0) { + revert(0, 0) + } } }