#9347: Added a robustness test for scanf

This commit is contained in:
orbitcowboy 2019-10-17 17:50:26 +02:00
parent 15d7b9c83f
commit 7c48874793
1 changed files with 4 additions and 0 deletions

View File

@ -2879,6 +2879,10 @@ void uninitvar_scanf(void)
char str[42];
// cppcheck-suppress uninitvar
(void)scanf(format, str);
// no warning is expected (#9347)
int i;
sscanf("0", "%d", &i);
}
void uninitvar_vsscanf(void)