Versions Compared

Key

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

...

Similar warnings were issued by the compiler for the first non-compliant example, with respect to the arguments of the strncpy function instead.

Since these are just warnings, the compiled code can still be run.  When run on the i686 Linux platform mentioned above, both noncompliant code examples began copying information from out of the bounds of the arguments.  This behavior is indicative a possible buffer overflow vulnerability.

Risk Assessment

Failure to use the proper-width string functions can lead to buffer overflows and the execution of arbitrary code by an attacker.

...