Skip to content

Commit a357eee

Browse files
committed
C++: Accept test changes.
1 parent afb1129 commit a357eee

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/pointer-deref/InvalidPointerDeref.expected

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,6 @@ edges
664664
| test.cpp:338:8:338:15 | * ... | test.cpp:342:8:342:17 | * ... |
665665
| test.cpp:341:8:341:17 | * ... | test.cpp:342:8:342:17 | * ... |
666666
| test.cpp:347:14:347:27 | new[] | test.cpp:348:15:348:16 | xs |
667-
| test.cpp:348:15:348:16 | xs | test.cpp:350:16:350:19 | ... ++ |
668-
| test.cpp:348:15:348:16 | xs | test.cpp:350:16:350:19 | ... ++ |
669-
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:15:350:19 | Load: * ... |
670-
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:16:350:19 | ... ++ |
671-
| test.cpp:350:16:350:19 | ... ++ | test.cpp:350:16:350:19 | ... ++ |
672667
| test.cpp:355:14:355:27 | new[] | test.cpp:356:15:356:16 | xs |
673668
| test.cpp:356:15:356:16 | xs | test.cpp:356:15:356:23 | ... + ... |
674669
| test.cpp:356:15:356:16 | xs | test.cpp:356:15:356:23 | ... + ... |
@@ -1057,10 +1052,6 @@ nodes
10571052
| test.cpp:342:8:342:17 | * ... | semmle.label | * ... |
10581053
| test.cpp:347:14:347:27 | new[] | semmle.label | new[] |
10591054
| test.cpp:348:15:348:16 | xs | semmle.label | xs |
1060-
| test.cpp:350:15:350:19 | Load: * ... | semmle.label | Load: * ... |
1061-
| test.cpp:350:16:350:19 | ... ++ | semmle.label | ... ++ |
1062-
| test.cpp:350:16:350:19 | ... ++ | semmle.label | ... ++ |
1063-
| test.cpp:350:16:350:19 | ... ++ | semmle.label | ... ++ |
10641055
| test.cpp:355:14:355:27 | new[] | semmle.label | new[] |
10651056
| test.cpp:356:15:356:16 | xs | semmle.label | xs |
10661057
| test.cpp:356:15:356:23 | ... + ... | semmle.label | ... + ... |
@@ -1118,7 +1109,6 @@ subpaths
11181109
| test.cpp:264:13:264:14 | Load: * ... | test.cpp:260:13:260:24 | new[] | test.cpp:264:13:264:14 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:260:13:260:24 | new[] | new[] | test.cpp:261:19:261:21 | len | len |
11191110
| test.cpp:274:5:274:10 | Store: ... = ... | test.cpp:270:13:270:24 | new[] | test.cpp:274:5:274:10 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:270:13:270:24 | new[] | new[] | test.cpp:271:19:271:21 | len | len |
11201111
| test.cpp:308:5:308:29 | Store: ... = ... | test.cpp:304:15:304:26 | new[] | test.cpp:308:5:308:29 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:304:15:304:26 | new[] | new[] | test.cpp:308:8:308:10 | ... + ... | ... + ... |
1121-
| test.cpp:350:15:350:19 | Load: * ... | test.cpp:347:14:347:27 | new[] | test.cpp:350:15:350:19 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:347:14:347:27 | new[] | new[] | test.cpp:348:20:348:23 | size | size |
11221112
| test.cpp:358:14:358:26 | Load: * ... | test.cpp:355:14:355:27 | new[] | test.cpp:358:14:358:26 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@ + 1. | test.cpp:355:14:355:27 | new[] | new[] | test.cpp:356:20:356:23 | size | size |
11231113
| test.cpp:359:14:359:32 | Load: * ... | test.cpp:355:14:355:27 | new[] | test.cpp:359:14:359:32 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@ + 2. | test.cpp:355:14:355:27 | new[] | new[] | test.cpp:356:20:356:23 | size | size |
11241114
| test.cpp:372:15:372:16 | Load: * ... | test.cpp:363:14:363:27 | new[] | test.cpp:372:15:372:16 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:363:14:363:27 | new[] | new[] | test.cpp:365:19:365:22 | size | size |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/pointer-deref/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void test24(unsigned size) {
347347
char *xs = new char[size];
348348
char *end = xs + size;
349349
if (xs < end) {
350-
int val = *xs++; // GOOD [FALSE POSITIVE]
350+
int val = *xs++; // GOOD
351351
}
352352
}
353353

0 commit comments

Comments
 (0)