Skip to content

Commit 2f8d809

Browse files
fix: STAA-7 remediation commit i
1 parent 2993a5b commit 2f8d809

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/ModuleManager.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ abstract contract ModuleManager is AllStorage, EIP712, IModuleManager {
774774
// 0xf23a6e61: `onERC1155Received(address,address,uint256,uint256,bytes)`.
775775
// 0xbc197c81: `onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)`.
776776
if or(eq(s, 0x150b7a02), or(eq(s, 0xf23a6e61), eq(s, 0xbc197c81))) {
777-
mstore(0x20, s) // Store `msg.sig`.
778-
return(0x3c, 0x20) // Return `msg.sig`.
777+
mstore(0x00, shl(224, s)) // Store msg.sig left-aligned in scratch space memory[0:32]
778+
return(0x00, 0x20) // Return clean 32-byte value for msg.sig
779779
}
780780
}
781781
// if there was no handler and it is not the onERCXXXReceived call, revert

0 commit comments

Comments
 (0)