File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
cpp/cert/test/rules/CTR55-CPP Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 4
4
| test.cpp:22:18:22:18 | i | Increment of iterator may overflow since its bounds are not checked. |
5
5
| test.cpp:28:31:28:31 | i | Increment of iterator may overflow since its bounds are not checked. |
6
6
| test.cpp:41:5:41:8 | end2 | Increment of iterator may overflow since its bounds are not checked. |
7
- | test.cpp:50 :42:50 :42 | i | Increment of iterator may overflow since its bounds are not checked. |
7
+ | test.cpp:53 :42:53 :42 | i | Increment of iterator may overflow since its bounds are not checked. |
Original file line number Diff line number Diff line change @@ -38,8 +38,11 @@ void test_fp_reported_in_374(std::vector<int> &v) {
38
38
39
39
{
40
40
auto end2 = v.end ();
41
- end2++; // NON_COMPLIANT
42
- for (auto i = v.begin (); i != end2; ++i) { // NON_COMPLIANT[FALSE_NEGATIVE]
41
+ end2++; // NON_COMPLIANT
42
+ for (auto i = v.begin (); i != end2;
43
+ ++i) { // NON_COMPLIANT[FALSE_NEGATIVE] - case of invalidations to
44
+ // check before use expected to be less frequent, can model in
45
+ // future if need be
43
46
}
44
47
}
45
48
}
You can’t perform that action at this time.
0 commit comments