This commit is contained in:
Anders Schack-Mulligen 2023-12-07 14:13:42 +01:00
Родитель c952f6a648
Коммит 9fafa973d8
3 изменённых файлов: 0 добавлений и 71 удалений

Просмотреть файл

@ -1 +0,0 @@
| 1 |

Просмотреть файл

@ -1,68 +0,0 @@
import cpp
import semmle.code.cpp.ir.dataflow.DataFlow
import semmle.code.cpp.ir.dataflow.DataFlow2
import semmle.code.cpp.ir.dataflow.DataFlow3
import semmle.code.cpp.ir.dataflow.DataFlow4
import semmle.code.cpp.ir.dataflow.TaintTracking
import semmle.code.cpp.ir.dataflow.TaintTracking2
class TestConf1 extends DataFlow::Configuration {
TestConf1() { this = "TestConf1" }
override predicate isSource(DataFlow::Node source) { any() }
override predicate isSink(DataFlow::Node sink) { any() }
}
class TestConf2 extends DataFlow2::Configuration {
TestConf2() { this = "TestConf2" }
override predicate isSource(DataFlow::Node source) {
exists(TestConf1 conf1 | conf1.hasFlowTo(source))
}
override predicate isSink(DataFlow::Node sink) { exists(TestConf1 conf1 | conf1.hasFlowTo(sink)) }
override predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
exists(TestConf1 conf1 |
conf1.hasFlowTo(n1) and
conf1.hasFlowTo(n2)
)
}
}
class TestConf3 extends DataFlow3::Configuration {
TestConf3() { this = "TestConf3" }
override predicate isSource(DataFlow::Node source) {
exists(TestConf2 conf2 | conf2.hasFlowTo(source))
}
override predicate isSink(DataFlow::Node sink) { exists(TestConf2 conf2 | conf2.hasFlowTo(sink)) }
override predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
exists(TestConf2 conf2 |
conf2.hasFlowTo(n1) and
conf2.hasFlowTo(n2)
)
}
}
class TestConf4 extends DataFlow4::Configuration {
TestConf4() { this = "TestConf4" }
override predicate isSource(DataFlow::Node source) {
exists(TestConf3 conf3 | conf3.hasFlowTo(source))
}
override predicate isSink(DataFlow::Node sink) { exists(TestConf3 conf3 | conf3.hasFlowTo(sink)) }
override predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
exists(TestConf3 conf3 |
conf3.hasFlowTo(n1) and
conf3.hasFlowTo(n2)
)
}
}
select 1

Просмотреть файл

@ -1,2 +0,0 @@
void f() {
}