Skip to content

Commit 33165f4

Browse files
committed
CPP: update expected output
1 parent a30c38f commit 33165f4

File tree

86 files changed

+768
-767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+768
-767
lines changed

cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ where
7474
config.hasFlowPath(source, sink) and
7575
source.getNode().asExpr() = sensitive and
7676
sqliteCall.getASource() = sink.getNode().asExpr()
77-
select sqliteCall, source, sink, "This SQLite call may store $@ in a non-encrypted SQLite database.",
78-
sensitive, "sensitive information"
77+
select sqliteCall, source, sink,
78+
"This SQLite call may store $@ in a non-encrypted SQLite database.", sensitive,
79+
"sensitive information"
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| test.cpp:20:21:20:22 | ref arg & ... | unsafe_put_user write user-mode pointer $@ without check. | test.cpp:20:21:20:22 | ref arg & ... | ref arg & ... |
2-
| test.cpp:41:21:41:22 | ref arg & ... | unsafe_put_user write user-mode pointer $@ without check. | test.cpp:41:21:41:22 | ref arg & ... | ref arg & ... |
3-
| test.cpp:69:21:69:27 | ref arg & ... | unsafe_put_user write user-mode pointer $@ without check. | test.cpp:69:21:69:27 | ref arg & ... | ref arg & ... |
1+
| test.cpp:20:21:20:22 | ref arg & ... | 'unsafe_put_user' write user-mode pointer $@ without check. | test.cpp:20:21:20:22 | ref arg & ... | ref arg & ... |
2+
| test.cpp:41:21:41:22 | ref arg & ... | 'unsafe_put_user' write user-mode pointer $@ without check. | test.cpp:41:21:41:22 | ref arg & ... | ref arg & ... |
3+
| test.cpp:69:21:69:27 | ref arg & ... | 'unsafe_put_user' write user-mode pointer $@ without check. | test.cpp:69:21:69:27 | ref arg & ... | ref arg & ... |
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.c:6:3:6:8 | call to memset | The value of argument '$@' appears to be checked after the call, rather than before it. | test.c:6:17:6:20 | len1 | len1 |
1+
| test.c:6:3:6:8 | call to memset | The value of argument $@ appears to be checked after the call, rather than before it. | test.c:6:17:6:20 | len1 | len1 |
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.cpp:23:3:23:8 | call to fclose | Consider changing the call to $@ | test.cpp:9:6:9:13 | myFclose | myFclose |
1+
| test.cpp:23:3:23:8 | call to fclose | Consider changing the call to $@. | test.cpp:9:6:9:13 | myFclose | myFclose |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-359/semmle/tests/PrivateCleartextWrite.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ nodes
1919
subpaths
2020
| test.cpp:81:22:81:28 | medical | test.cpp:45:18:45:23 | buffer | test.cpp:47:10:47:15 | buffer | test.cpp:81:17:81:20 | call to func |
2121
#select
22-
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@ | test.cpp:57:9:57:18 | theZipcode | this source. |
23-
| test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | This write into the external location 'medical' may contain unencrypted data from $@ | test.cpp:74:24:74:30 | medical | this source. |
24-
| test.cpp:78:24:78:27 | temp | test.cpp:77:16:77:22 | medical | test.cpp:78:24:78:27 | temp | This write into the external location 'temp' may contain unencrypted data from $@ | test.cpp:77:16:77:22 | medical | this source. |
25-
| test.cpp:82:24:82:28 | buff5 | test.cpp:81:22:81:28 | medical | test.cpp:82:24:82:28 | buff5 | This write into the external location 'buff5' may contain unencrypted data from $@ | test.cpp:81:22:81:28 | medical | this source. |
26-
| test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@ | test.cpp:96:37:96:46 | theZipcode | this source. |
27-
| test.cpp:99:42:99:51 | theZipcode | test.cpp:99:42:99:51 | theZipcode | test.cpp:99:42:99:51 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@ | test.cpp:99:42:99:51 | theZipcode | this source. |
22+
| test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | test.cpp:57:9:57:18 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:57:9:57:18 | theZipcode | this source of private data. |
23+
| test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | test.cpp:74:24:74:30 | medical | This write into the external location 'medical' may contain unencrypted data from $@. | test.cpp:74:24:74:30 | medical | this source of private data. |
24+
| test.cpp:78:24:78:27 | temp | test.cpp:77:16:77:22 | medical | test.cpp:78:24:78:27 | temp | This write into the external location 'temp' may contain unencrypted data from $@. | test.cpp:77:16:77:22 | medical | this source of private data. |
25+
| test.cpp:82:24:82:28 | buff5 | test.cpp:81:22:81:28 | medical | test.cpp:82:24:82:28 | buff5 | This write into the external location 'buff5' may contain unencrypted data from $@. | test.cpp:81:22:81:28 | medical | this source of private data. |
26+
| test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode | test.cpp:96:37:96:46 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:96:37:96:46 | theZipcode | this source of private data. |
27+
| test.cpp:99:42:99:51 | theZipcode | test.cpp:99:42:99:51 | theZipcode | test.cpp:99:42:99:51 | theZipcode | This write into the external location 'theZipcode' may contain unencrypted data from $@. | test.cpp:99:42:99:51 | theZipcode | this source of private data. |
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
| test.c:34:29:34:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
2-
| test.c:63:29:63:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
3-
| test.c:139:29:139:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
4-
| test.c:186:29:186:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
5-
| test.c:282:29:282:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
6-
| test.c:299:26:299:32 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
7-
| test.c:328:29:328:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
8-
| test.c:342:29:342:35 | call to realloc | possible loss of original pointer on unsuccessful call realloc |
1+
| test.c:34:29:34:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
2+
| test.c:63:29:63:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
3+
| test.c:139:29:139:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
4+
| test.c:186:29:186:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
5+
| test.c:282:29:282:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
6+
| test.c:299:26:299:32 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
7+
| test.c:328:29:328:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
8+
| test.c:342:29:342:35 | call to realloc | Possible loss of original pointer on unsuccessful call realloc. |
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| test.cpp:45:20:45:31 | call to SSL_shutdown | You need to handle the return value SSL_shutdown |
2-
| test.cpp:61:11:61:22 | call to SSL_shutdown | You need to handle the return value SSL_shutdown |
1+
| test.cpp:45:20:45:31 | call to SSL_shutdown | You need to handle the return value 'SSL_shutdown'. |
2+
| test.cpp:61:11:61:22 | call to SSL_shutdown | You need to handle the return value 'SSL_shutdown'. |
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test.c:15:6:15:16 | ... + ... | this expression needs your attention |
2-
| test.c:17:17:17:27 | ... + ... | this expression needs your attention |
3-
| test.c:22:10:22:15 | ... > ... | this expression needs your attention |
4-
| test.c:26:10:26:15 | ... > ... | this expression needs your attention |
1+
| test.c:15:6:15:16 | ... + ... | This expression needs your attention. |
2+
| test.c:17:17:17:27 | ... + ... | This expression needs your attention. |
3+
| test.c:22:10:22:15 | ... > ... | This expression needs your attention. |
4+
| test.c:26:10:26:15 | ... > ... | This expression needs your attention. |
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
| test.cpp:52:3:52:7 | call to scanf | Unchecked return value for call to 'scanf'. |
2-
| test.cpp:53:3:53:7 | call to scanf | Unchecked return value for call to 'scanf'. |
3-
| test.cpp:54:3:54:7 | call to scanf | Unchecked return value for call to 'scanf'. |
4-
| test.cpp:105:3:105:7 | call to scanf | Unchecked return value for call to 'scanf'. |
5-
| test.cpp:106:3:106:7 | call to scanf | Unchecked return value for call to 'scanf'. |
6-
| test.cpp:107:3:107:7 | call to scanf | Unchecked return value for call to 'scanf'. |
7-
| test.cpp:115:3:115:7 | call to scanf | Unchecked return value for call to 'scanf'. |
8-
| test.cpp:120:3:120:7 | call to scanf | Unchecked return value for call to 'scanf'. |
1+
| test.cpp:52:3:52:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
2+
| test.cpp:53:3:53:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
3+
| test.cpp:54:3:54:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
4+
| test.cpp:105:3:105:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
5+
| test.cpp:106:3:106:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
6+
| test.cpp:107:3:107:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
7+
| test.cpp:115:3:115:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |
8+
| test.cpp:120:3:120:7 | call to scanf | Unchecked return value for call to $@. | test.cpp:1:5:1:9 | scanf | scanf |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-783/semmle/tests/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| test.cpp:24:6:24:13 | ... \| ... | Expression ranges do not match operation precedence. |
55
| test.cpp:28:6:28:13 | ... ^ ... | Expression ranges do not match operation precedence. |
66
| test.cpp:33:6:33:13 | ... \| ... | Expression ranges do not match operation precedence. |
7-
| test.cpp:38:6:38:13 | ... \| ... | specify the priority with parentheses. |
7+
| test.cpp:38:6:38:13 | ... \| ... | Specify the priority with parentheses. |

0 commit comments

Comments
 (0)