...
The results are similar to the first non-compliant code example.
...
Risk Assessment
Using an invalid iterator range is similar to allowing a buffer overflow, which can lead to an attacker running arbitrary code.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level | |
---|---|---|---|---|---|---|
STL31-C | ||||||
Component | Value | |||||
Severity | 3 (high) | Likelihood | 2 (probable) Remediation cost | 1 (high) | P6 | L2 |
References
- Sutter 05 Item 83: Use a checked STL implementation.
- Meyers 01 Item 21: Always have comparison functions return false for equal values.
- ISO/IEC 14882-2003 Section 24: Iterators Library.