mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Revert "Merge pull request #17938 from MathiasVP/fix-fp-in-missing-check-scanf-fixing-take-2"
This reverts commit6785b93ed8, reversing changes made tod9b86f55c8.
This commit is contained in:
@@ -553,27 +553,3 @@ void switch_cases(const char *data) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void test_scanf_compared_right_away() {
|
||||
int i;
|
||||
bool success = scanf("%d", &i) == 1;
|
||||
if(success) {
|
||||
use(i); // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
void test_scanf_compared_in_conjunct_right(bool b) {
|
||||
int i;
|
||||
bool success = b && scanf("%d", &i) == 1;
|
||||
if(success) {
|
||||
use(i); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
}
|
||||
|
||||
void test_scanf_compared_in_conjunct_left(bool b) {
|
||||
int i;
|
||||
bool success = scanf("%d", &i) == 1 && b;
|
||||
if(success) {
|
||||
use(i); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user