[git commit] lineedit: in !EDITING config, return -1 on fgets error
Denys Vlasenko
vda.linux at googlemail.com
Thu Sep 27 14:03:49 UTC 2012
commit: http://git.busybox.net/busybox/commit/?id=b2320370be14811459718b9fe418efed75ea3615
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libbb/lineedit.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
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 @@ 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);
}
More information about the busybox-cvs
mailing list