Skip to content

Commit c4b97a3

Browse files
committed
C++: Accept more test changes
1 parent edc33b6 commit c4b97a3

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void test1()
112112
{
113113
char buffer[256] = {0};
114114
sink(mysprintf(buffer, 256, "%s", string::source()));
115-
sink(buffer); // tainted [NOT DETECTED - implement UserDefinedFormattingFunction.getOutputParameterIndex()]
115+
sink(buffer); // tainted
116116
}
117117

118118
{

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@
206206
| format.cpp:113:21:113:24 | {...} | format.cpp:115:8:115:13 | buffer | |
207207
| format.cpp:113:23:113:23 | 0 | format.cpp:113:21:113:24 | {...} | TAINT |
208208
| format.cpp:114:18:114:23 | ref arg buffer | format.cpp:115:8:115:13 | buffer | |
209+
| format.cpp:114:31:114:34 | %s | format.cpp:114:18:114:23 | ref arg buffer | TAINT |
210+
| format.cpp:114:37:114:50 | call to source | format.cpp:114:18:114:23 | ref arg buffer | TAINT |
209211
| format.cpp:119:10:119:11 | 0 | format.cpp:120:29:120:29 | i | |
210212
| format.cpp:119:10:119:11 | 0 | format.cpp:121:8:121:8 | i | |
211213
| format.cpp:120:28:120:29 | ref arg & ... | format.cpp:120:29:120:29 | i [inner post update] | |

cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| format.cpp:100:8:100:13 | buffer | format.cpp:99:30:99:43 | call to source |
2323
| format.cpp:105:8:105:13 | buffer | format.cpp:104:31:104:45 | call to source |
2424
| format.cpp:110:8:110:14 | wbuffer | format.cpp:109:38:109:52 | call to source |
25+
| format.cpp:115:8:115:13 | buffer | format.cpp:114:37:114:50 | call to source |
2526
| format.cpp:157:7:157:22 | access to array | format.cpp:147:12:147:25 | call to source |
2627
| format.cpp:158:7:158:27 | ... + ... | format.cpp:148:16:148:30 | call to source |
2728
| movableclass.cpp:44:8:44:9 | s1 | movableclass.cpp:39:21:39:26 | call to source |

cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| format.cpp:100:8:100:13 | format.cpp:99:30:99:43 | AST only |
2323
| format.cpp:105:8:105:13 | format.cpp:104:31:104:45 | AST only |
2424
| format.cpp:110:8:110:14 | format.cpp:109:38:109:52 | AST only |
25+
| format.cpp:115:8:115:13 | format.cpp:114:37:114:50 | AST only |
2526
| movableclass.cpp:44:8:44:9 | movableclass.cpp:39:21:39:26 | AST only |
2627
| movableclass.cpp:45:8:45:9 | movableclass.cpp:40:23:40:28 | AST only |
2728
| movableclass.cpp:46:8:46:9 | movableclass.cpp:42:8:42:13 | AST only |

0 commit comments

Comments
 (0)