Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

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