Versions Compared

Key

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

...

Tool

Version

Checker

Description

Coverity

Include Page
Coverity_V
Coverity_V

BAD_COMPARE

Can detect the specific instance where the address of a function is compared against 0, such as in the case of
geteuid versus getuid() in the implementation-specific details.LDRA tool suite

Include Page
LDRA_VLDRA_V
  GCC
Include Page
GCC_V
GCC_V
 

Can detect violations of this recommendation when the -Wall flag is used.

Klocwork

Include Page
Klocwork_V
Klocwork_V

EFFECT

 

LDRA tool suite

Include Page
LDRA_V
LDRA_V
  

Related Vulnerabilities

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

...

CERT C++ Secure Coding StandardEXP16-CPP. Avoid conversions using void pointers
ISO/IEC TR 17961(Draft) Comparing function addresses to zero [funcaddr]
ISO/IEC TR 24772Likely incorrect expressions [KOA]
MITRE CWECWE-480, Use of incorrect operator, and
CWE-482, Comparing instead of assigning

...

[Hatton 1995]Section 2.7.2, "Errors of Omission and Addition"