A loop runs for a count taken directly from caller input or from data an attacker can enlarge, with no upper bound. The caller (or a griefer) forces a gas-exhausting or reverting iteration.
// function process(uint n) external { for (uint i; i<n; ++i) doWork(); } // process(type(uint).max) -> guaranteed OOG revert; wasted gas / grief.
require(n <= MAX_ITER, "too many");
for (uint i; i < n; ++i) { ... }
The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0242 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.