mirror of
https://github.com/sheumann/hush.git
synced 2025-01-04 22:34:37 +00:00
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)
|
if(inp == NULL)
|
||||||
inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin;
|
inp = (inp_stdin) ? bb_xfopen(CURRENT_TTY, "r") : stdin;
|
||||||
|
if(inp == NULL) bb_perror_msg_and_die("no tty");
|
||||||
|
|
||||||
if (flags & FLAG_N)
|
if (flags & FLAG_N)
|
||||||
add_linenumbers();
|
add_linenumbers();
|
||||||
|
Loading…
Reference in New Issue
Block a user