Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP16-C

low

likely

medium

P6

L2

Automated Detection

Tool

Version

Checker

Description

Section

Coverity Prevent

Include Page
c:Coverity_Vc:
Coverity_V
Section

BAD_COMPARE

Section

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.

Section

LDRA tool suite

Include Page
c:LDRA_Vc:
LDRA_V

 

 

Section

GCC

Include Page
c:GCC_Vc:
GCC_V

 

Section

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

Section

Klocwork

Include Page
c:Klocwork_Vc:
Klocwork_V
Section

EFFECT

 

Related Vulnerabilities

...

MITRE CWE: CWE-480, "Use of Incorrect Operator"

Bibliography

Wiki Markup\[[Hatton 1995|AA. Bibliography#Hatton 95] \] Section 2.7.2, "Errors of omission and addition"

...

      03. Expressions (EXP)      EXP17-C. Do not perform bitwise operations in conditional expressions