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:
parent
f5f75c5e82
commit
d67cef2425
10 changed files with 68 additions and 31 deletions
|
@ -99,7 +99,7 @@ int readprofile_main(int argc, char **argv)
|
|||
/*
|
||||
* Use an fd for the profiling buffer, to skip stdio overhead
|
||||
*/
|
||||
len = INT_MAX;
|
||||
len = MAXINT(ssize_t);
|
||||
buf = xmalloc_open_read_close(proFile, &len);
|
||||
if (!optNative) {
|
||||
int entries = len/sizeof(*buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue