Skip to content

Commit cae60c5

Browse files
authored
Tag memory safe assembly blocks (#5193)
1 parent c01a0fa commit cae60c5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

contracts/governance/Governor.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
769769

770770
// Extract what would be the `#proposer=0x` marker beginning the suffix
771771
bytes12 marker;
772-
assembly {
772+
assembly ("memory-safe") {
773773
// - Start of the string contents in memory = description + 32
774774
// - First character of the marker = len - 52
775775
// - Length of "#proposer=0x0000000000000000000000000000000000000000" = 52

contracts/metatx/ERC2771Forwarder.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ contract ERC2771Forwarder is EIP712, Nonces {
286286

287287
uint256 gasLeft;
288288

289-
assembly {
289+
assembly ("memory-safe") {
290290
success := call(reqGas, to, value, add(data, 0x20), mload(data), 0, 0)
291291
gasLeft := gas()
292292
}

contracts/utils/introspection/ERC165Checker.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ library ERC165Checker {
113113
bool success;
114114
uint256 returnSize;
115115
uint256 returnValue;
116-
assembly {
116+
assembly ("memory-safe") {
117117
success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)
118118
returnSize := returndatasize()
119119
returnValue := mload(0x00)

0 commit comments

Comments
 (0)