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

Use of gets is inherently unsafe

criticalC/C++CWE-242CVSS 9.8

What it detects

gets performs an unbounded read from stdin and always risks buffer overflow.

How to fix

Replace gets with fgets and a fixed buffer size.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-004: Use of gets is inherently unsafe — Zennoxa Shield