mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Update test.cpp
This commit is contained in:
@@ -119,3 +119,10 @@ int functionWork3b(int i) {
|
||||
scanf("%i", &i); // BAD
|
||||
return 0;
|
||||
}
|
||||
int functionWork3() {
|
||||
char number[] = "42";
|
||||
int d;
|
||||
sscanf(number, "%d", &d); // GOOD: sscanf always succeeds
|
||||
if (d < 16)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user