LibC: Lock file during gets
This commit is contained in:
@@ -611,6 +611,7 @@ ssize_t getline(char** __restrict lineptr, size_t* __restrict n, FILE* __restric
|
|||||||
|
|
||||||
char* gets(char* buffer)
|
char* gets(char* buffer)
|
||||||
{
|
{
|
||||||
|
ScopeLock _(stdin);
|
||||||
if (stdin->eof)
|
if (stdin->eof)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user