Skip to content

Commit 0227ab4

Browse files
committed
memory-safety
1 parent d79627b commit 0227ab4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contracts/utils/LowLevelCall.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ library LowLevelCall {
112112
/// @dev Revert with the return data from the last call.
113113
function bubbleRevert() internal pure {
114114
assembly ("memory-safe") {
115-
returndatacopy(0, 0, returndatasize())
116-
revert(0, returndatasize())
115+
let fmp := mload(0x40)
116+
returndatacopy(fmp, 0, returndatasize())
117+
revert(fmp, returndatasize())
117118
}
118119
}
119120

0 commit comments

Comments
 (0)