Skip to content

Commit 230f4bc

Browse files
committed
C++: accept test changes from IR sharing
1 parent b281102 commit 230f4bc

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/ifs/ifs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ int main(int argc, char **argv) {
8686
i3 = argv[1];
8787
printf(i3);
8888

89-
// BAD: varOne is 1 so condition is true and it always goes inside the if
89+
// BAD [FALSE NEGATIVE]: varOne is 1 so condition is true and it always goes inside the if
9090
char *i4;
9191
if (varOne)
9292
i4 = argv[1];
9393
printf(i4);
9494

95-
// BAD: varZero is 0 so condition is true and it always goes inside the if
95+
// BAD [FALSE NEGATIVE]: varZero is 0 so condition is true and it always goes inside the if
9696
char *i5;
9797
if (!varZero)
9898
i5 = argv[1];

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/ifs/ifs.expected

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@ edges
3939
| ifs.c:86:8:86:11 | argv | ifs.c:87:9:87:10 | i3 |
4040
| ifs.c:86:8:86:11 | argv | ifs.c:87:9:87:10 | i3 indirection |
4141
| ifs.c:86:8:86:11 | argv | ifs.c:87:9:87:10 | i3 indirection |
42-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | (const char *)... |
43-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | (const char *)... |
44-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 |
45-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 |
46-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 |
47-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 |
48-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 indirection |
49-
| ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 indirection |
50-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | (const char *)... |
51-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | (const char *)... |
52-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 |
53-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 |
54-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 |
55-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 |
56-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 indirection |
57-
| ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 indirection |
5842
| ifs.c:105:8:105:11 | argv | ifs.c:106:9:106:10 | (const char *)... |
5943
| ifs.c:105:8:105:11 | argv | ifs.c:106:9:106:10 | (const char *)... |
6044
| ifs.c:105:8:105:11 | argv | ifs.c:106:9:106:10 | i6 |
@@ -133,24 +117,6 @@ nodes
133117
| ifs.c:87:9:87:10 | i3 | semmle.label | i3 |
134118
| ifs.c:87:9:87:10 | i3 indirection | semmle.label | i3 indirection |
135119
| ifs.c:87:9:87:10 | i3 indirection | semmle.label | i3 indirection |
136-
| ifs.c:92:8:92:11 | argv | semmle.label | argv |
137-
| ifs.c:92:8:92:11 | argv | semmle.label | argv |
138-
| ifs.c:93:9:93:10 | (const char *)... | semmle.label | (const char *)... |
139-
| ifs.c:93:9:93:10 | (const char *)... | semmle.label | (const char *)... |
140-
| ifs.c:93:9:93:10 | i4 | semmle.label | i4 |
141-
| ifs.c:93:9:93:10 | i4 | semmle.label | i4 |
142-
| ifs.c:93:9:93:10 | i4 | semmle.label | i4 |
143-
| ifs.c:93:9:93:10 | i4 indirection | semmle.label | i4 indirection |
144-
| ifs.c:93:9:93:10 | i4 indirection | semmle.label | i4 indirection |
145-
| ifs.c:98:8:98:11 | argv | semmle.label | argv |
146-
| ifs.c:98:8:98:11 | argv | semmle.label | argv |
147-
| ifs.c:99:9:99:10 | (const char *)... | semmle.label | (const char *)... |
148-
| ifs.c:99:9:99:10 | (const char *)... | semmle.label | (const char *)... |
149-
| ifs.c:99:9:99:10 | i5 | semmle.label | i5 |
150-
| ifs.c:99:9:99:10 | i5 | semmle.label | i5 |
151-
| ifs.c:99:9:99:10 | i5 | semmle.label | i5 |
152-
| ifs.c:99:9:99:10 | i5 indirection | semmle.label | i5 indirection |
153-
| ifs.c:99:9:99:10 | i5 indirection | semmle.label | i5 indirection |
154120
| ifs.c:105:8:105:11 | argv | semmle.label | argv |
155121
| ifs.c:105:8:105:11 | argv | semmle.label | argv |
156122
| ifs.c:106:9:106:10 | (const char *)... | semmle.label | (const char *)... |
@@ -193,8 +159,6 @@ nodes
193159
| ifs.c:75:9:75:10 | i1 | ifs.c:74:8:74:11 | argv | ifs.c:75:9:75:10 | i1 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:74:8:74:11 | argv | argv |
194160
| ifs.c:81:9:81:10 | i2 | ifs.c:80:8:80:11 | argv | ifs.c:81:9:81:10 | i2 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:80:8:80:11 | argv | argv |
195161
| ifs.c:87:9:87:10 | i3 | ifs.c:86:8:86:11 | argv | ifs.c:87:9:87:10 | i3 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:86:8:86:11 | argv | argv |
196-
| ifs.c:93:9:93:10 | i4 | ifs.c:92:8:92:11 | argv | ifs.c:93:9:93:10 | i4 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:92:8:92:11 | argv | argv |
197-
| ifs.c:99:9:99:10 | i5 | ifs.c:98:8:98:11 | argv | ifs.c:99:9:99:10 | i5 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:98:8:98:11 | argv | argv |
198162
| ifs.c:106:9:106:10 | i6 | ifs.c:105:8:105:11 | argv | ifs.c:106:9:106:10 | i6 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:105:8:105:11 | argv | argv |
199163
| ifs.c:112:9:112:10 | i7 | ifs.c:111:8:111:11 | argv | ifs.c:112:9:112:10 | i7 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:111:8:111:11 | argv | argv |
200164
| ifs.c:118:9:118:10 | i8 | ifs.c:117:8:117:11 | argv | ifs.c:118:9:118:10 | i8 | The value of this argument may come from $@ and is being used as a formatting argument to printf(format) | ifs.c:117:8:117:11 | argv | argv |

0 commit comments

Comments
 (0)