Skip to content
medium External Calls No SWC entry CWE-130

Return Data Length Not Checked (Memory Bomb / Decode Error)

SAFE-0092 External Calls Checked automatically by the scanner
1

What goes wrong

After a low-level call, returndata is decoded or copied without checking its length, enabling a malicious callee to return huge data (gas griefing) or malformed data that mis-decodes.

2

How to fix it

the pattern that is safe
(bool ok, bytes memory d) = t.call(data);
require(ok && d.length >= 32, "bad return");
uint x = abi.decode(d, (uint));
Validate returndata length and bound it.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0092 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