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

strncpy without null termination

mediumC/C++CWE-170CVSS 5.9

What it detects

strncpy may leave the destination without a null terminator when the source fills the buffer.

How to fix

Explicitly set the final byte to zero or use strlcpy.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-020: strncpy without null termination — Zennoxa Shield