projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9371043
)
lineedit: in !EDITING config, return -1 on fgets error
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 27 Sep 2012 14:03:49 +0000
(16:03 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 27 Sep 2012 14:03:49 +0000
(16:03 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c
patch
|
blob
|
history
diff --git
a/libbb/lineedit.c
b/libbb/lineedit.c
index 92bea856e4bd9fcb70222726f2ab8d673ae76a2d..dbe616466d09dffe4797ab22123b8fe536d3e60f 100644
(file)
--- 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);
}