commit | b2320370be14811459718b9fe418efed75ea3615 | [log] [tgz] |
---|---|---|
author | Denys Vlasenko <vda.linux@googlemail.com> | Thu Sep 27 16:03:49 2012 +0200 |
committer | Denys Vlasenko <vda.linux@googlemail.com> | Thu Sep 27 16:03:49 2012 +0200 |
tree | 8f53f5e8f5d4176ffe9932fd502be056f4ea56b2 | |
parent | 9371043698933452bb69566f279a6e40af961c8c [diff] [blame] |
lineedit: in !EDITING config, return -1 on fgets error Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 92bea85..dbe6164 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c
@@ -2729,7 +2729,8 @@ { fputs(prompt, stdout); fflush_all(); - fgets(command, maxsize, stdin); + if (!fgets(command, maxsize, stdin)) + return -1; return strlen(command); }