Skip to content

Commit 835b5e3

Browse files
committed
C++: Accept test changes.
1 parent 0f285cc commit 835b5e3

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,10 @@ edges
214214
| test.cpp:543:14:543:27 | new[] | test.cpp:548:5:548:19 | ... = ... |
215215
| test.cpp:554:14:554:27 | new[] | test.cpp:559:5:559:19 | ... = ... |
216216
| test.cpp:642:14:642:31 | new[] | test.cpp:647:5:647:19 | ... = ... |
217-
| test.cpp:652:14:652:27 | new[] | test.cpp:656:3:656:6 | ... ++ |
218-
| test.cpp:652:14:652:27 | new[] | test.cpp:656:3:656:6 | ... ++ |
219-
| test.cpp:652:14:652:27 | new[] | test.cpp:662:3:662:11 | ... = ... |
220-
| test.cpp:656:3:656:6 | ... ++ | test.cpp:656:3:656:6 | ... ++ |
221-
| test.cpp:656:3:656:6 | ... ++ | test.cpp:662:3:662:11 | ... = ... |
222-
| test.cpp:656:3:656:6 | ... ++ | test.cpp:662:3:662:11 | ... = ... |
223217
| test.cpp:667:14:667:31 | new[] | test.cpp:675:7:675:23 | ... = ... |
224218
| test.cpp:695:13:695:26 | new[] | test.cpp:698:5:698:10 | ... += ... |
219+
| test.cpp:695:13:695:26 | new[] | test.cpp:698:5:698:10 | ... += ... |
220+
| test.cpp:698:5:698:10 | ... += ... | test.cpp:698:5:698:10 | ... += ... |
225221
| test.cpp:698:5:698:10 | ... += ... | test.cpp:701:15:701:16 | * ... |
226222
| test.cpp:705:18:705:18 | q | test.cpp:705:18:705:18 | q |
227223
| test.cpp:705:18:705:18 | q | test.cpp:706:12:706:13 | * ... |
@@ -371,14 +367,11 @@ nodes
371367
| test.cpp:559:5:559:19 | ... = ... | semmle.label | ... = ... |
372368
| test.cpp:642:14:642:31 | new[] | semmle.label | new[] |
373369
| test.cpp:647:5:647:19 | ... = ... | semmle.label | ... = ... |
374-
| test.cpp:652:14:652:27 | new[] | semmle.label | new[] |
375-
| test.cpp:656:3:656:6 | ... ++ | semmle.label | ... ++ |
376-
| test.cpp:656:3:656:6 | ... ++ | semmle.label | ... ++ |
377-
| test.cpp:662:3:662:11 | ... = ... | semmle.label | ... = ... |
378370
| test.cpp:667:14:667:31 | new[] | semmle.label | new[] |
379371
| test.cpp:675:7:675:23 | ... = ... | semmle.label | ... = ... |
380372
| test.cpp:695:13:695:26 | new[] | semmle.label | new[] |
381373
| test.cpp:698:5:698:10 | ... += ... | semmle.label | ... += ... |
374+
| test.cpp:698:5:698:10 | ... += ... | semmle.label | ... += ... |
382375
| test.cpp:701:15:701:16 | * ... | semmle.label | * ... |
383376
| test.cpp:705:18:705:18 | q | semmle.label | q |
384377
| test.cpp:705:18:705:18 | q | semmle.label | q |
@@ -418,7 +411,6 @@ subpaths
418411
| test.cpp:548:5:548:19 | ... = ... | test.cpp:543:14:543:27 | new[] | test.cpp:548:5:548:19 | ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:543:14:543:27 | new[] | new[] | test.cpp:548:8:548:14 | src_pos | src_pos |
419412
| test.cpp:559:5:559:19 | ... = ... | test.cpp:554:14:554:27 | new[] | test.cpp:559:5:559:19 | ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:554:14:554:27 | new[] | new[] | test.cpp:559:8:559:14 | src_pos | src_pos |
420413
| test.cpp:647:5:647:19 | ... = ... | test.cpp:642:14:642:31 | new[] | test.cpp:647:5:647:19 | ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:642:14:642:31 | new[] | new[] | test.cpp:647:8:647:14 | src_pos | src_pos |
421-
| test.cpp:662:3:662:11 | ... = ... | test.cpp:652:14:652:27 | new[] | test.cpp:662:3:662:11 | ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@ + 1. | test.cpp:652:14:652:27 | new[] | new[] | test.cpp:653:19:653:22 | size | size |
422414
| test.cpp:675:7:675:23 | ... = ... | test.cpp:667:14:667:31 | new[] | test.cpp:675:7:675:23 | ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:667:14:667:31 | new[] | new[] | test.cpp:675:10:675:18 | ... ++ | ... ++ |
423415
| test.cpp:701:15:701:16 | * ... | test.cpp:695:13:695:26 | new[] | test.cpp:701:15:701:16 | * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:695:13:695:26 | new[] | new[] | test.cpp:696:19:696:22 | size | size |
424416
| test.cpp:706:12:706:13 | * ... | test.cpp:711:13:711:26 | new[] | test.cpp:706:12:706:13 | * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:711:13:711:26 | new[] | new[] | test.cpp:712:19:712: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
@@ -659,7 +659,7 @@ void test32(unsigned size) {
659659
xs++;
660660
if (xs >= end)
661661
return;
662-
xs[0] = 0; // $ deref=L656->L662+1 deref=L657->L662+1 GOOD [FALSE POSITIVE]
662+
xs[0] = 0; // GOOD
663663
}
664664

665665
void test33(unsigned size, unsigned src_pos)

0 commit comments

Comments
 (0)