Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this noncompliant example, the unformatted input function std::basic_istream<T>::read() is used to read an unformatted character array of 32 characters from the given file. However, the read() function does not guarantee that the string will be null terminated, so the subsequent of call of the std::string constructor results in undefined behavior if the character array does not contain a null terminator.

...

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

...