...
The intent of these iterator invalidation rules is to give implementors greater freedom in implementation techniques. Some implementations implement method versions that do not invalidate references, pointers, and iterators in all cases. Check with the documentation for your implementation before attempting to access a (potentially) invalid iterator. Document any violation of the semantics specified by the standard for portability.
Priority: P6 Level: L2
Using an invalid reference, pointer or iterator to a string object could allow an attacker to run arbitrary code.
Component | Value |
---|---|
Severity | 3 (high) |
Likelihood | 2 (probable) |
Remediation cost | 1 (high) |
References
- Meyers 01 Item 43: Prefer algorithm calls to hand-written loops.
- ISO/IEC 14882-2003 21.3 Class template basic_string.