mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
25 lines
377 B
C++
25 lines
377 B
C++
int source();
|
|
void sink(int);
|
|
|
|
void throughLocal() {
|
|
int local = source();
|
|
sink(local); // flow
|
|
}
|
|
|
|
int flowTestGlobal1 = 0;
|
|
|
|
void readWriteGlobal1() {
|
|
sink(flowTestGlobal1); // flow
|
|
flowTestGlobal1 = source();
|
|
}
|
|
|
|
static int flowTestGlobal2 = 0;
|
|
|
|
void readGlobal2() {
|
|
sink(flowTestGlobal2); // flow
|
|
}
|
|
|
|
void writeGlobal2() {
|
|
flowTestGlobal2 = source();
|
|
}
|