vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.84k stars 788 forks source link

Folded Nodes Are Not Validated #4108

Open ritzdorf opened 4 months ago

ritzdorf commented 4 months ago

Version Information

When some node is folded the folded value is not validated. In the general case, it is not an issue as the semantic validation phase will catch the error. However, if the folded value is used in a type annotation for a String or Byte type, the compiler will not raise.

POC

The following contract compiles although the size in byte of the String is greater than the maximum value of uint256

x:String[max_value(uint256) + 10]