Weakness
Improper Null Termination
CWE-170 · Base · Incomplete
The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
Extended description
Null termination errors frequently occur in two different ways. An off-by-one error could cause a null to be written out of bounds, leading to an overflow. Or, a program could use a strncpy() function call incorrectly, which prevents a null terminator from being added at all.
Other scenarios are possible.
△
Weakness Relationships
Where this weakness sits in the CWE hierarchy. Walk up to broader classes or down to more specific variants.
Parent of this (broader)
⚠
CVEs With This Weakness
54A sample of the 54 CVEs tagged with this weakness.
View all 54 CVEs with this weakness
External lookups - second-class, for what we don’t hold ourselves