mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
This cleans up the test results, which were confusing because functions like `sink` had multiple locations. There are some additional results now involving casts to `const char *` because previously it varied whether `sink` used `const`, and now it always does.
25 lines
344 B
C++
25 lines
344 B
C++
#include "shared.h"
|
|
|
|
|
|
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");
|
|
}
|