mirror of
https://github.com/github/codeql.git
synced 2026-07-20 10:48:17 +02:00
42 lines
530 B
C
42 lines
530 B
C
// semmle-extractor-options: --microsoft
|
|
|
|
void ProbeFunction();
|
|
void sink();
|
|
|
|
void f() {
|
|
int x, y = 0;
|
|
__try {
|
|
ProbeFunction(0);
|
|
x = y;
|
|
ProbeFunction(0);
|
|
}
|
|
__except (0) {
|
|
sink(x);
|
|
}
|
|
}
|
|
|
|
void g() {
|
|
int x, y = 0;
|
|
__try {
|
|
ProbeFunction(0);
|
|
x = y;
|
|
ProbeFunction(0);
|
|
}
|
|
__finally {
|
|
sink(x);
|
|
}
|
|
}
|
|
|
|
void AfxThrowMemoryException();
|
|
|
|
void h(int b) {
|
|
int x = 0;
|
|
__try {
|
|
if (b) {
|
|
AfxThrowMemoryException();
|
|
}
|
|
}
|
|
__except (1) {
|
|
sink(x);
|
|
}
|
|
} |