Less would segfault if it had no tty. (Bug 600.)
This commit is contained in:
parent
199501f2a0
commit
4b91b88fcb
@ -239,6 +239,7 @@ static void data_readlines(void) {
|
||||
|
||||
if(inp == NULL)
|
||||
inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin;
|
||||
if(inp == NULL) bb_perror_msg_and_die("no tty");
|
||||
|
||||
if (flags & FLAG_N)
|
||||
add_linenumbers();
|
||||
|
Loading…
Reference in New Issue
Block a user