All rules →
Rules / C/C++
SHIELD-CPP-005

Unbounded scanf %s read

highC/C++CWE-120CVSS 8.1

What it detects

scanf with %s reads into a buffer without a width limit and can overflow it.

How to fix

Specify a maximum field width such as %31s matching the buffer size.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-005: Unbounded scanf %s read — Zennoxa Shield