mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-21 16:02:59 -05:00
tst: launcher-secrets: secret: replace gets with fgets
This commit is contained in:
parent
507c794470
commit
b058925692
@ -16,7 +16,14 @@ int main()
|
||||
{
|
||||
char pass[256];
|
||||
|
||||
gets(pass);
|
||||
fgets(pass, sizeof pass, stdin);
|
||||
for (char *p = pass; *p; p++)
|
||||
if ('\n' == *p)
|
||||
{
|
||||
*p = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
if (0 == strcmp("foobar", pass))
|
||||
{
|
||||
puts("OK");
|
||||
|
Loading…
x
Reference in New Issue
Block a user