Skip to content

Commit ce3654c

Browse files
committed
C++: Make ql-for-ql happy.
1 parent 162ec28 commit ce3654c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

cpp/ql/src/experimental/Likely Bugs/ArrayAccessProductFlow.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ from
7474
DataFlow::PathNode sink1, DataFlow2::PathNode sink2
7575
where conf.hasFlowPath(source1, source2, sink1, sink2)
7676
// TODO: pull delta out and display it
77-
select sink1.getNode(), source1, sink1, "off-by one error allocated at $@ bounded by $@", source1,
77+
select sink1.getNode(), source1, sink1, "Off-by one error allocated at $@ bounded by $@.", source1,
7878
source1.toString(), sink2, sink2.toString()

cpp/ql/src/experimental/Likely Bugs/OverrunWriteProductFlow.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ from
3333
DataFlow::PathNode sink1, DataFlow2::PathNode sink2
3434
where conf.hasFlowPath(source1, source2, sink1, sink2)
3535
// TODO: pull delta out and display it
36-
select sink1.getNode(), source1, sink1, "overrunning write allocated at $@ bounded by $@", source1,
36+
select sink1.getNode(), source1, sink1, "Overrunning write allocated at $@ bounded by $@.", source1,
3737
source1.toString(), sink2, sink2.toString()

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-119/OverrunWriteProductFlow.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ nodes
2929
| test.cpp:35:21:35:23 | str indirection [string] | semmle.label | str indirection [string] |
3030
subpaths
3131
#select
32-
| test.cpp:26:18:26:23 | Load | test.cpp:18:19:18:24 | call to malloc | test.cpp:26:18:26:23 | Load | overrunning write allocated at $@ bounded by $@ | test.cpp:18:19:18:24 | call to malloc | call to malloc | test.cpp:26:31:26:39 | Convert | Convert |
33-
| test.cpp:30:18:30:23 | Load | test.cpp:18:19:18:24 | call to malloc | test.cpp:30:18:30:23 | Load | overrunning write allocated at $@ bounded by $@ | test.cpp:18:19:18:24 | call to malloc | call to malloc | test.cpp:30:31:30:39 | Convert | Convert |
32+
| test.cpp:26:18:26:23 | Load | test.cpp:18:19:18:24 | call to malloc | test.cpp:26:18:26:23 | Load | Overrunning write allocated at $@ bounded by $@. | test.cpp:18:19:18:24 | call to malloc | call to malloc | test.cpp:26:31:26:39 | Convert | Convert |
33+
| test.cpp:30:18:30:23 | Load | test.cpp:18:19:18:24 | call to malloc | test.cpp:30:18:30:23 | Load | Overrunning write allocated at $@ bounded by $@. | test.cpp:18:19:18:24 | call to malloc | call to malloc | test.cpp:30:31:30:39 | Convert | Convert |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/array-access/ArrayAccessProductFlow.expected

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ nodes
9696
| test.cpp:98:18:98:27 | call to mk_array_p indirection [p] | semmle.label | call to mk_array_p indirection [p] |
9797
subpaths
9898
#select
99-
| test.cpp:10:9:10:11 | Load | test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:4:17:4:22 | call to malloc | test.cpp:4:17:4:22 | call to malloc | test.cpp:5:25:5:28 | Load | test.cpp:5:25:5:28 | Load |
100-
| test.cpp:10:9:10:11 | Load | test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:4:17:4:22 | call to malloc | test.cpp:4:17:4:22 | call to malloc | test.cpp:9:26:9:29 | Load | test.cpp:9:26:9:29 | Load |
101-
| test.cpp:35:13:35:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:35:13:35:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:21:13:21:18 | call to malloc | test.cpp:21:13:21:18 | call to malloc | test.cpp:30:29:30:32 | Load | test.cpp:30:29:30:32 | Load |
102-
| test.cpp:35:13:35:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:35:13:35:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:21:13:21:18 | call to malloc | test.cpp:21:13:21:18 | call to malloc | test.cpp:34:30:34:33 | Load | test.cpp:34:30:34:33 | Load |
103-
| test.cpp:45:13:45:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:45:13:45:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:21:13:21:18 | call to malloc | test.cpp:21:13:21:18 | call to malloc | test.cpp:40:29:40:32 | Load | test.cpp:40:29:40:32 | Load |
104-
| test.cpp:45:13:45:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:45:13:45:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:21:13:21:18 | call to malloc | test.cpp:21:13:21:18 | call to malloc | test.cpp:44:30:44:33 | Load | test.cpp:44:30:44:33 | Load |
105-
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:55:13:55:18 | call to malloc | test.cpp:55:13:55:18 | call to malloc | test.cpp:56:5:56:19 | Store | test.cpp:56:5:56:19 | Store |
106-
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:55:13:55:18 | call to malloc | test.cpp:55:13:55:18 | call to malloc | test.cpp:56:5:56:19 | Store | test.cpp:56:5:56:19 | Store |
107-
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:55:13:55:18 | call to malloc | test.cpp:55:13:55:18 | call to malloc | test.cpp:56:16:56:19 | Load | test.cpp:56:16:56:19 | Load |
108-
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:55:13:55:18 | call to malloc | test.cpp:55:13:55:18 | call to malloc | test.cpp:58:29:58:32 | Load | test.cpp:58:29:58:32 | Load |
109-
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:55:13:55:18 | call to malloc | test.cpp:55:13:55:18 | call to malloc | test.cpp:62:30:62:33 | Load | test.cpp:62:30:62:33 | Load |
110-
| test.cpp:83:14:83:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:83:14:83:14 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:69:14:69:19 | call to malloc | test.cpp:69:14:69:19 | call to malloc | test.cpp:82:31:82:34 | Load | test.cpp:82:31:82:34 | Load |
111-
| test.cpp:93:14:93:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:93:14:93:14 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:69:14:69:19 | call to malloc | test.cpp:69:14:69:19 | call to malloc | test.cpp:88:30:88:33 | Load | test.cpp:88:30:88:33 | Load |
112-
| test.cpp:93:14:93:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:93:14:93:14 | Load | off-by one error allocated at $@ bounded by $@ | test.cpp:69:14:69:19 | call to malloc | test.cpp:69:14:69:19 | call to malloc | test.cpp:92:31:92:34 | Load | test.cpp:92:31:92:34 | Load |
99+
| test.cpp:10:9:10:11 | Load | test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:4:17:4:22 | call to malloc | call to malloc | test.cpp:5:25:5:28 | Load | Load |
100+
| test.cpp:10:9:10:11 | Load | test.cpp:4:17:4:22 | call to malloc | test.cpp:10:9:10:11 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:4:17:4:22 | call to malloc | call to malloc | test.cpp:9:26:9:29 | Load | Load |
101+
| test.cpp:35:13:35:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:35:13:35:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:21:13:21:18 | call to malloc | call to malloc | test.cpp:30:29:30:32 | Load | Load |
102+
| test.cpp:35:13:35:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:35:13:35:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:21:13:21:18 | call to malloc | call to malloc | test.cpp:34:30:34:33 | Load | Load |
103+
| test.cpp:45:13:45:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:45:13:45:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:21:13:21:18 | call to malloc | call to malloc | test.cpp:40:29:40:32 | Load | Load |
104+
| test.cpp:45:13:45:13 | Load | test.cpp:21:13:21:18 | call to malloc | test.cpp:45:13:45:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:21:13:21:18 | call to malloc | call to malloc | test.cpp:44:30:44:33 | Load | Load |
105+
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:55:13:55:18 | call to malloc | call to malloc | test.cpp:56:5:56:19 | Store | Store |
106+
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:55:13:55:18 | call to malloc | call to malloc | test.cpp:56:5:56:19 | Store | Store |
107+
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:55:13:55:18 | call to malloc | call to malloc | test.cpp:56:16:56:19 | Load | Load |
108+
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:55:13:55:18 | call to malloc | call to malloc | test.cpp:58:29:58:32 | Load | Load |
109+
| test.cpp:63:13:63:13 | Load | test.cpp:55:13:55:18 | call to malloc | test.cpp:63:13:63:13 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:55:13:55:18 | call to malloc | call to malloc | test.cpp:62:30:62:33 | Load | Load |
110+
| test.cpp:83:14:83:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:83:14:83:14 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:69:14:69:19 | call to malloc | call to malloc | test.cpp:82:31:82:34 | Load | Load |
111+
| test.cpp:93:14:93:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:93:14:93:14 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:69:14:69:19 | call to malloc | call to malloc | test.cpp:88:30:88:33 | Load | Load |
112+
| test.cpp:93:14:93:14 | Load | test.cpp:69:14:69:19 | call to malloc | test.cpp:93:14:93:14 | Load | Off-by one error allocated at $@ bounded by $@. | test.cpp:69:14:69:19 | call to malloc | call to malloc | test.cpp:92:31:92:34 | Load | Load |

0 commit comments

Comments
 (0)