From: Denys Vlasenko Date: Thu, 27 Sep 2012 14:03:49 +0000 (+0200) Subject: lineedit: in !EDITING config, return -1 on fgets error X-Git-Tag: 1_21_0~63 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b2320370be14811459718b9fe418efed75ea3615;p=oweals%2Fbusybox.git lineedit: in !EDITING config, return -1 on fgets error Signed-off-by: Denys Vlasenko --- 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); }