mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use calldatacopy for selector retrieval to avoid access out of bounds for calldata.
This commit is contained in:
@@ -21,7 +21,9 @@ object \"C_6\" {
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
mstore(0, 0)
|
||||
calldatacopy(28, 0, 4)
|
||||
let selector := mload(0)
|
||||
switch selector
|
||||
case 0x26121ff0 {
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
Reference in New Issue
Block a user