Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 1.13 KB

Certain functions lack input validation routines.md

File metadata and controls

29 lines (26 loc) · 1.13 KB

The functions should first check if the passed arguments are valid first. These checks should include, but not be limited to:

  1. uint should be larger than 0 when 0 is considered invalid
  2. uint should be within constraints
  3. int should be positive in some cases
  4. length of arrays should match if more arrays are sent as arguments
  5. addresses should not be 0x0

Recommendation:

Add tests that check if all of the arguments have been validated. Consider checking arguments as an important part of writing code and developing the system.


Slide Screenshot

023.jpg


Slide Text

  • ConsenSys Audit Shell Protocol Finding 6.2
  • Input Validation
  • Major Severity
  • Parameter Checks
  • Valid/Threshold/o/+ve
  • Add Checks Testing

References


Tags