Versions Compared

Key

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

...

Code Block
bgColor#ccccff
void report_error(const char *msg) {
  printf("Error: %s\n", msg);
}

Risk Assessment

Splint Version 3.1.1 can detect violations of this rule.

Accessing uninitialized variables generally leads to unexpected program behavior. In some cases these types of flaws may allow the execution of arbitrary code.

...

Fortify SCA Version 5.0 can detect violations of this rule, but will return false positives if the initialization was done in another function.

Splint Version 3.1.1 can detect violations of this rule.

GCC Compiler can detect some violations of this rule when the -Wuninitialized flag is used.

...