hush: fix read builtin to not read ahead past eol and to not use

insane amounts of stack. Testsuite updated.
This commit is contained in:
Denis Vlasenko
2007-06-13 06:47:47 +00:00
parent f5f75c5e82
commit d67cef2425
10 changed files with 68 additions and 31 deletions

View File

@ -11567,8 +11567,8 @@ readcmd(int argc, char **argv)
#endif
#if ENABLE_ASH_READ_TIMEOUT
if (ts.tv_sec || ts.tv_usec) {
FD_ZERO (&set);
FD_SET (0, &set);
FD_ZERO(&set);
FD_SET(0, &set);
i = select(FD_SETSIZE, &set, NULL, NULL, &ts);
if (!i) {