| Package | Affected versions | Patched versions |
|---|---|---|
| vyper | < 0.2.6 | 0.2.6 |
When we pass a multi-dimensional array (like [[1, 2], [3, 4]]) as an argument to internal/external functions we get incorrect output. This is due to a stack management issue, because it was assumed that the size of each subtype of an array/struct is 32, which is not always correct.
Example code:
@internal
def test_input(arr: int128[2][1], i: int128) -> (int128[2][1], int128):
return arr, i
@external
def test_values(arr: int128[2][1], i: int128) -> (int128[2][1], int128):
return self.test_input(arr, i)
Please see #2183 for further information
This problem was fixed in #2184, and released as a part of v0.2.6.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free