Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-09-27 18:03:49 +0400
committerDenys Vlasenko <vda.linux@googlemail.com>2012-09-27 18:03:49 +0400
commitb2320370be14811459718b9fe418efed75ea3615 (patch)
tree8f53f5e8f5d4176ffe9932fd502be056f4ea56b2 /libbb
parent9371043698933452bb69566f279a6e40af961c8c (diff)
lineedit: in !EDITING config, return -1 on fgets error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/lineedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 92bea856e..dbe616466 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -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);
}