mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bugfix.
This commit is contained in:
parent
d92ed3fd29
commit
d3a837b340
@ -1454,7 +1454,7 @@ string ABIFunctions::calldataAccessFunction(Type const& _type)
|
|||||||
length := calldataload(value)
|
length := calldataload(value)
|
||||||
value := add(value, 0x20)
|
value := add(value, 0x20)
|
||||||
if gt(length, 0xffffffffffffffff) { <revertStringLength>() }
|
if gt(length, 0xffffffffffffffff) { <revertStringLength>() }
|
||||||
if sgt(base_ref, sub(calldatasize(), mul(length, <calldataStride>))) { <revertStringStride>() }
|
if sgt(value, sub(calldatasize(), mul(length, <calldataStride>))) { <revertStringStride>() }
|
||||||
)")
|
)")
|
||||||
("calldataStride", toCompactHexWithPrefix(arrayType->calldataStride()))
|
("calldataStride", toCompactHexWithPrefix(arrayType->calldataStride()))
|
||||||
// TODO add test
|
// TODO add test
|
||||||
|
@ -14,10 +14,10 @@ contract C {
|
|||||||
// revertStrings: debug
|
// revertStrings: debug
|
||||||
// ----
|
// ----
|
||||||
// h(uint256[][]): 0x20, 1, 0x20, 0 ->
|
// h(uint256[][]): 0x20, 1, 0x20, 0 ->
|
||||||
// h(uint256[][]): 0x20, 1, 0x20, 1 ->
|
// h(uint256[][]): 0x20, 1, 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
// h(uint256[][]): 0x20, 1, 0x20, 2 ->
|
// h(uint256[][]): 0x20, 1, 0x20, 2 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
// h(uint256[][]): 0x20, 1, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
// h(uint256[][]): 0x20, 1, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
// f((uint256[])): 0x20, 0x20, 0 ->
|
// f((uint256[])): 0x20, 0x20, 0 ->
|
||||||
// f((uint256[])): 0x20, 0x20, 1 ->
|
// f((uint256[])): 0x20, 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
// f((uint256[])): 0x20, 0x20, 2 ->
|
// f((uint256[])): 0x20, 0x20, 2 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
// f((uint256[])): 0x20, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
// f((uint256[])): 0x20, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
|
||||||
|
Loading…
Reference in New Issue
Block a user