Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 664 Bytes

47.md

File metadata and controls

10 lines (7 loc) · 664 Bytes

Uninitialized Storage Pointer

Description:

Uninitialized local storage variables can point to unexpected storage locations in the contract, which can lead to intentional or unintentional vulnerabilities.

Remediation:

Check if the contract requires a storage object as in many situations this is actually not the case. If a local variable is sufficient, mark the storage location of the variable explicitly with the memory attribute. If a storage variable is needed then initialise it upon declaration and additionally specify the storage location storage.

References:

https://swcregistry.io/docs/SWC-109