← Commit list

b2320370b

Denys Vlasenko
Denys Vlasenko
2012-09-27
SUCCESS Duration: 191s

Subject

lineedit: in !EDITING config, return -1 on fgets error

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/lineedit.c+2 -1
@@ -2729,7 +2729,8 @@ int FAST_FUNC read_line_input(const char* prompt, char* command, int maxsize)
{
fputs(prompt, stdout);
fflush_all();
- fgets(command, maxsize, stdin);
+ if (!fgets(command, maxsize, stdin))
+ return -1;
return strlen(command);
}