Versions Compared

Key

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

...

Tool

Version

Checker

Description

Compass/ROSE  

Can detect violations of this rule. It 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 scope, would be difficult

Coverity

6.5

RETURN_LOCAL

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

Fortify SCA

7.6.0

 

Can detect violations when an array is declared in a function and then a pointer to that array is returned

Klocwork

9.1

LOCRET.*

 

LDRA tool suite

8.5.4

42 D
71 S

Fully implemented
PRQA QA-C8.1

3217
3225
3230
4140

Partially implemented
Splint3.1.1  
PRQA QA-C++
Include Page
PRQA QA-C++_v
PRQA QA-C++_v
2515, 2516, 2527, 2528, 4028, 4624, 4629 

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...