mirror of
https://github.com/github/codeql.git
synced 2026-01-17 08:24:46 +01:00
18 lines
266 B
C++
18 lines
266 B
C++
{
|
|
int i, j, r;
|
|
|
|
r = scanf("%d %d", &i, &j);
|
|
|
|
use(i); // BAD: i is not guarded
|
|
|
|
if (r >= 1) {
|
|
use(i); // GOOD: i is guarded correctly
|
|
use(j); // BAD: j is guarded incorrectly
|
|
}
|
|
|
|
if (r != 2)
|
|
return;
|
|
|
|
use(j); // GOOD: j is guarded correctly
|
|
}
|