Skip to content

Commit 3fe58d9

Browse files
committed
C++: Accept test changes.
1 parent ae8ecc9 commit 3fe58d9

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -595,25 +595,6 @@ edges
595595
| test.cpp:657:7:657:8 | xs | test.cpp:662:3:662:11 | Store: ... = ... |
596596
| test.cpp:667:14:667:31 | new[] | test.cpp:675:7:675:19 | access to array |
597597
| test.cpp:675:7:675:19 | access to array | test.cpp:675:7:675:23 | Store: ... = ... |
598-
| test.cpp:679:6:679:23 | pointer_arithmetic indirection | test.cpp:690:24:690:41 | call to pointer_arithmetic |
599-
| test.cpp:679:6:679:23 | pointer_arithmetic indirection | test.cpp:690:24:690:41 | call to pointer_arithmetic |
600-
| test.cpp:679:30:679:30 | p | test.cpp:680:10:680:10 | p |
601-
| test.cpp:680:10:680:10 | p | test.cpp:680:10:680:19 | ... + ... |
602-
| test.cpp:680:10:680:10 | p | test.cpp:680:10:680:19 | ... + ... |
603-
| test.cpp:680:10:680:19 | ... + ... | test.cpp:679:6:679:23 | pointer_arithmetic indirection |
604-
| test.cpp:680:10:680:19 | ... + ... | test.cpp:679:6:679:23 | pointer_arithmetic indirection |
605-
| test.cpp:684:12:684:24 | new[] | test.cpp:685:33:685:33 | p |
606-
| test.cpp:685:33:685:33 | p | test.cpp:679:30:679:30 | p |
607-
| test.cpp:689:12:689:24 | new[] | test.cpp:690:43:690:43 | p |
608-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:690:24:690:41 | call to pointer_arithmetic |
609-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:691:3:691:16 | * ... |
610-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:691:3:691:22 | Store: ... = ... |
611-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:691:3:691:22 | Store: ... = ... |
612-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:691:3:691:22 | Store: ... = ... |
613-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | test.cpp:691:4:691:16 | end_minus_one |
614-
| test.cpp:690:43:690:43 | p | test.cpp:679:30:679:30 | p |
615-
| test.cpp:691:3:691:16 | * ... | test.cpp:691:3:691:22 | Store: ... = ... |
616-
| test.cpp:691:4:691:16 | end_minus_one | test.cpp:691:3:691:22 | Store: ... = ... |
617598
nodes
618599
| test.cpp:4:15:4:20 | call to malloc | semmle.label | call to malloc |
619600
| test.cpp:5:15:5:22 | ... + ... | semmle.label | ... + ... |
@@ -902,21 +883,7 @@ nodes
902883
| test.cpp:667:14:667:31 | new[] | semmle.label | new[] |
903884
| test.cpp:675:7:675:19 | access to array | semmle.label | access to array |
904885
| test.cpp:675:7:675:23 | Store: ... = ... | semmle.label | Store: ... = ... |
905-
| test.cpp:679:6:679:23 | pointer_arithmetic indirection | semmle.label | pointer_arithmetic indirection |
906-
| test.cpp:679:30:679:30 | p | semmle.label | p |
907-
| test.cpp:680:10:680:10 | p | semmle.label | p |
908-
| test.cpp:680:10:680:19 | ... + ... | semmle.label | ... + ... |
909-
| test.cpp:680:10:680:19 | ... + ... | semmle.label | ... + ... |
910-
| test.cpp:684:12:684:24 | new[] | semmle.label | new[] |
911-
| test.cpp:685:33:685:33 | p | semmle.label | p |
912-
| test.cpp:689:12:689:24 | new[] | semmle.label | new[] |
913-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | semmle.label | call to pointer_arithmetic |
914-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | semmle.label | call to pointer_arithmetic |
915-
| test.cpp:690:24:690:41 | call to pointer_arithmetic | semmle.label | call to pointer_arithmetic |
916-
| test.cpp:690:43:690:43 | p | semmle.label | p |
917-
| test.cpp:691:3:691:16 | * ... | semmle.label | * ... |
918886
| test.cpp:691:3:691:22 | Store: ... = ... | semmle.label | Store: ... = ... |
919-
| test.cpp:691:4:691:16 | end_minus_one | semmle.label | end_minus_one |
920887
subpaths
921888
#select
922889
| test.cpp:6:14:6:15 | Load: * ... | test.cpp:4:15:4:20 | call to malloc | test.cpp:6:14:6:15 | Load: * ... | This read might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:4:15:4:20 | call to malloc | call to malloc | test.cpp:5:19:5:22 | size | size |
@@ -952,4 +919,3 @@ subpaths
952919
| test.cpp:647:5:647:19 | Store: ... = ... | test.cpp:642:14:642:31 | new[] | test.cpp:647:5:647:19 | Store: ... = ... | 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 |
953920
| test.cpp:662:3:662:11 | Store: ... = ... | test.cpp:652:14:652:27 | new[] | test.cpp:662:3:662:11 | Store: ... = ... | 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 |
954921
| test.cpp:675:7:675:23 | Store: ... = ... | test.cpp:667:14:667:31 | new[] | test.cpp:675:7:675:23 | Store: ... = ... | 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 | ... ++ | ... ++ |
955-
| test.cpp:691:3:691:22 | Store: ... = ... | test.cpp:684:12:684:24 | new[] | test.cpp:691:3:691:22 | Store: ... = ... | This write might be out of bounds, as the pointer might be equal to $@ + $@. | test.cpp:684:12:684:24 | new[] | new[] | test.cpp:680:14:680:19 | offset | offset |

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
@@ -688,5 +688,5 @@ void test_missing_call_context_1(unsigned size) {
688688
void test_missing_call_context_2(unsigned size) {
689689
int* p = new int[size];
690690
int* end_minus_one = pointer_arithmetic(p, size - 1);
691-
*end_minus_one = '0'; // GOOD [FALSE POSITIVE]
691+
*end_minus_one = '0'; // GOOD
692692
}

0 commit comments

Comments
 (0)