Skip to content

Commit 021331b

Browse files
committed
check revert msg length
1 parent c748134 commit 021331b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RescueStrategy.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ contract RescueStrategy is IERC4626 {
9090
(bool success, bytes memory reason) = earnVault.staticcall(abi.encodeCall(IEulerEarnBase.setFee, (0)));
9191
require(!success, "expected revert"); // if reentrancy was unlocked, attempt to set it will panic
9292

93-
if (bytes4(reason) == ReentrancyGuard.ReentrancyGuardReentrantCall.selector)
93+
if (reason.length == 4 && bytes4(reason) == ReentrancyGuard.ReentrancyGuardReentrantCall.selector)
9494
revert("vault operations are paused - maxWithdraw");
9595
}
9696
return 0;

0 commit comments

Comments
 (0)