Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM Cost Reform

...

If adding or subtracting an integer to a pointer results in a reference to an element outside the array or one past the last element of the array object, the behavior is undefined but frequently leads to a buffer overflow or buffer underrun, which can often be exploited to run arbitrary code. Iterators and standard template library containers exhibit the same behavior and caveats as pointers and arrays.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

CTR55-CPP

High

Likely

No

NoMedium

P18P9

L1L2

Automated Detection

Tool

Version

Checker

Description

Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

DF3526, DF3527, DF3528, DF3529, DF3530, DF3531, DF3532, DF3533, DF3534


Klocwork
Include Page
Klocwork_V
Klocwork_V

ITER.ADVANCE.NONADJACENT


LDRA tool suite
Include Page
LDRA_V
LDRA_V

567 S

Enhanced Enforcement

Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_CPP-CTR55-a

Do not add or subtract a constant with a value greater than one from an iterator

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: CTR55-CPPChecks for possible iterator overflows (rule partially covered).

...