From c4b97a3a626e821ef1a71fc14d842685ba71c152 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 15 Jul 2020 16:19:51 +0200 Subject: [PATCH] C++: Accept more test changes --- cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp | 2 +- .../test/library-tests/dataflow/taint-tests/localTaint.expected | 2 ++ cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected | 1 + .../test/library-tests/dataflow/taint-tests/test_diff.expected | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp index 90bbb1ca0cd..fbe78cf02e1 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/format.cpp @@ -112,7 +112,7 @@ void test1() { char buffer[256] = {0}; sink(mysprintf(buffer, 256, "%s", string::source())); - sink(buffer); // tainted [NOT DETECTED - implement UserDefinedFormattingFunction.getOutputParameterIndex()] + sink(buffer); // tainted } { diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected index 94e9bfed22e..116671fe11d 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected @@ -206,6 +206,8 @@ | format.cpp:113:21:113:24 | {...} | format.cpp:115:8:115:13 | buffer | | | format.cpp:113:23:113:23 | 0 | format.cpp:113:21:113:24 | {...} | TAINT | | format.cpp:114:18:114:23 | ref arg buffer | format.cpp:115:8:115:13 | buffer | | +| format.cpp:114:31:114:34 | %s | format.cpp:114:18:114:23 | ref arg buffer | TAINT | +| format.cpp:114:37:114:50 | call to source | format.cpp:114:18:114:23 | ref arg buffer | TAINT | | format.cpp:119:10:119:11 | 0 | format.cpp:120:29:120:29 | i | | | format.cpp:119:10:119:11 | 0 | format.cpp:121:8:121:8 | i | | | format.cpp:120:28:120:29 | ref arg & ... | format.cpp:120:29:120:29 | i [inner post update] | | diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected index 61ff7941b68..7453af3a6c6 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected @@ -22,6 +22,7 @@ | format.cpp:100:8:100:13 | buffer | format.cpp:99:30:99:43 | call to source | | format.cpp:105:8:105:13 | buffer | format.cpp:104:31:104:45 | call to source | | format.cpp:110:8:110:14 | wbuffer | format.cpp:109:38:109:52 | call to source | +| format.cpp:115:8:115:13 | buffer | format.cpp:114:37:114:50 | call to source | | format.cpp:157:7:157:22 | access to array | format.cpp:147:12:147:25 | call to source | | format.cpp:158:7:158:27 | ... + ... | format.cpp:148:16:148:30 | call to source | | movableclass.cpp:44:8:44:9 | s1 | movableclass.cpp:39:21:39:26 | call to source | diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected index 4c0aa6dc0d3..f2f5200464f 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected @@ -22,6 +22,7 @@ | format.cpp:100:8:100:13 | format.cpp:99:30:99:43 | AST only | | format.cpp:105:8:105:13 | format.cpp:104:31:104:45 | AST only | | format.cpp:110:8:110:14 | format.cpp:109:38:109:52 | AST only | +| format.cpp:115:8:115:13 | format.cpp:114:37:114:50 | AST only | | movableclass.cpp:44:8:44:9 | movableclass.cpp:39:21:39:26 | AST only | | movableclass.cpp:45:8:45:9 | movableclass.cpp:40:23:40:28 | AST only | | movableclass.cpp:46:8:46:9 | movableclass.cpp:42:8:42:13 | AST only |