Versions Compared

Key

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

...

ARR36-C-EX1: Comparing two pointers to distinct members of the same struct object is allowed. Pointers to structure members declared later in the structure compare greater-than pointers to members declared earlier in the structure.

Risk Assessment

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

ARR36-C

Medium

Probable

Medium

P8

L2

Automated Detection

Tool

Version

Checker

Description

Astrée
Include Page
Astrée_V
Astrée_V
pointer-subtractionPartially checked
Coverity
Include Page
Coverity_V
Coverity_V

MISRA C 2004 17.2

MISRA C 2004 17.3

MISRA C 2012 18.2

MISRA C 2012 18.3

Implemented
LDRA tool suite
Include Page
LDRA_V
LDRA_V

437 S, 438 S

Fully implemented

Parasoft C/C++test9.5MISRA2008-5_0_17, MISRA2004-17_2Fully implemented
PRQA QA-C
Include Page
PRQA QA-C_v
PRQA QA-C_v

0487, 0513, 2771, 2772,
2773, 2761,
2762,
2763, 2766, 2767,
2768

Fully implemented

Related Vulnerabilities

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

...

Key here (explains table format and definitions)

Taxonomy

Taxonomy item

Relationship

CERT CCTR54-CPP. Do not subtract iterators that do not refer to the same containerPrior to 2018-01-12: CERT: Unspecified Relationship
ISO/IEC TS 17961Subtracting or comparing two pointers that do not refer to the same array [ptrobj]Prior to 2018-01-12: CERT: Unspecified Relationship
CWE 2.11CWE-469, Use of Pointer Subtraction to Determine Size2017-07-10: CERT: Exact

Bibliography

...


...