Versions Compared

Key

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

...

Code Block
bgColor#ccccff
char const *error_msg = "Error occurred";
/* ... */
printf("%d:%s", 15, error_message);

As shown, care should be taken that the arguments passed to a format string function match up with the supplied format string.

Risk Assessment

Inconsistent typing in variadic functions can result in abnormal program termination or unintended information disclosure.

...