You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vyper Version (output of vyper --version): 0.1.0b16
OS: linux
Python: 3.8
What's your issue about?
When a contract expects to receive a fixed length bytes or string array, there is no check on the length of the received data. In the following example, calling Bar.bar(Foo.address) returns b"foobar".
This is an issue because Vyper does not allow dynamic arrays but Solidity does. If a Vyper contract is interacting with a Solidity contract that returns bytes or string it must give an upper bound on the expected bytes length.
How can it be fixed?
Check the length of the returned data when receiving a bytes or string array. If the length exceeds the given upper bound, truncate it.
The text was updated successfully, but these errors were encountered:
Version Information
vyper --version
):0.1.0b16
3.8
What's your issue about?
When a contract expects to receive a fixed length bytes or string array, there is no check on the length of the received data. In the following example, calling
Bar.bar(Foo.address)
returnsb"foobar"
.Contract
Foo
:Contract
Bar
:This is an issue because Vyper does not allow dynamic arrays but Solidity does. If a Vyper contract is interacting with a Solidity contract that returns
bytes
orstring
it must give an upper bound on the expected bytes length.How can it be fixed?
Check the length of the returned data when receiving a bytes or string array. If the length exceeds the given upper bound, truncate it.
The text was updated successfully, but these errors were encountered: