Skip to content

Latest commit

 

History

History
 
 

wrong_constructor_name

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Wrong Constructor Name

A function intended to be a constructor is named incorrectly, which causes it to end up in the runtime bytecode instead of being a constructor.

Attack

Anyone can call the function that was supposed to be the constructor. As a result anyone can change the state variables initialized in this function.

Mitigations

  • Use constructor instead of a named constructor

Examples