09.SWC-109_Uninitialized Storage Pointer
2023-07-13 16:11:08
# 09.SWC
SWC-109_Uninitialized Storage Pointer
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 locationstorage
.Note: As of compiler version 0.5.0 and higher this issue has been systematically resolved as contracts with uninitialised storage pointers do no longer compile.
1 | pragma solidity ^0.4.19; |