mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
25 lines
380 B
C++
25 lines
380 B
C++
char * getenv(const char *);
|
|
void sink(char *sinkParam);
|
|
|
|
void throughLocal() {
|
|
char * local = getenv("VAR");
|
|
sink(local); // flow
|
|
}
|
|
|
|
char * global1 = 0;
|
|
|
|
void readWriteGlobal1() {
|
|
sink(global1); // flow
|
|
global1 = getenv("VAR");
|
|
}
|
|
|
|
static char * global2 = 0;
|
|
|
|
void readGlobal2() {
|
|
sink(global2); // flow
|
|
}
|
|
|
|
void writeGlobal2() {
|
|
global2 = getenv("VAR");
|
|
}
|