Update draft-ERC7579Utils.sol

pull/5400/head
Hadrien Croubois 1 month ago committed by GitHub
parent 36dcfb7814
commit 381c5cf6fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      contracts/account/utils/draft-ERC7579Utils.sol

@ -231,14 +231,13 @@ library ERC7579Utils {
Execution calldata item = executionBatch[i];
bytes calldata itemCalldata = item.callData;
bool outOfBound;
uint256 itemEnd;
uint256 itemCalldataEnd;
assembly ("memory-safe") {
outOfBound := or(
gt(add(item, 0x60), bound),
gt(add(itemCalldata.offset, itemCalldata.length), bound)
)
itemOffset := add(item, 0x60)
itemCalldataEnd := add(itemCalldata.offset, itemCalldata.length)
}
if (outOfBound) revert ERC7579DecodingError();
if (itemEnd > bound || itemCalldataEnd > bound) revert ERC7579DecodingError();
}
}
}

Loading…
Cancel
Save