Versions Compared

Key

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

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL30-C

3 ( high )

2 ( probable )

1 ( high )

P6

L2

Automated Detection

The LDRA tool suite V 7.6.0 is able to detect violations of this rule.

...

The tool Compass Rose automatically detects returning pointers to local variables. Detecting more general cases, such as examples where static pointers are set to local variables which then go out of ocope woul dbe scope would be difficult.

The Coverity Prevent RETURN_LOCAL checker finds many instances where a function will return a pointer to a local stack variable. Coverity Prevent cannot discover all violations of this rule, so further verification is necessary.

...