Versions Compared

Key

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

...

Non compliant code

Code Block
bgColor#FFCCCC
function(1, 2);
...
void function(int one, int two, int three){
printf("args %d %d $d, one, two, three);
}

solution: "Implementation: Forward declare all functions. This is the recommended solution. Properly forward declaration of all used functions will result in a compiler error if too few arguments are sent to a function." -http://cwe.mitre.org/

Compliant code

Code Block
bgColor#ccccff
void function(int one, int two, int three); //at top of file or in .h file
...
function(1,2) //compiler error

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DRAFT

3 (high)

3 (likely)

2 (medium)

P18

L1

References