Improve input validation for ABI ints
Ouverte
Team Scytale
- Langage dominant
- Python
- Étoiles
- 288
- Forks
- 138
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Currently ABI integer decoding is not as strict as it could be.
Specifically, for smaller-than-64 bit uints, if too many bytes are provided, only the expected number of bytes at the beginning are used and the rest are ignored. And for 64-bit uints, providing too many bytes will cause an error, but providing too few (unless there are 0) will work without any errors.
For consistency and safety, an error should be thrown if the number of bytes provided is not the number of bytes the int type expects.
Also consider if boolean decoding should be modified similarly.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.