Skip to content

Uninitialized Storage Pointer (legacy)

SAFE-0095 Logic / State Checked automatically by the scanner
1

What goes wrong

In older Solidity, an uninitialized local storage struct/array pointer defaults to slot 0, so writes overwrite critical early storage variables (like owner).

2

How to fix it

the pattern that is safe
StructT storage s = items[id]; s.x = 1; // explicit target
SWC-109. Initialize storage pointers (legacy compilers).
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0095 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs