CWE-170

Overview
  • CWE ID
  • 170
  • CWE Name
  • Improper Null Termination
  • CWE Abstraction
  • Base
  • CWE structure
  • Simple
  • CWE Status
  • Incomplete
Description
The software 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 fro
Related CWEs
CWE ID View ID Nature Ordinal
707 1000 ChildOf Primary
120 1000 CanPrecede
126 1000 CanPrecede
147 1000 CanAlsoBe
464 1000 PeerOf
463 1000 PeerOf
20 700 ChildOf Primary