From d67cef2425fb5e75b75d52d9a308da6d29cd7a0d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 13 Jun 2007 06:47:47 +0000 Subject: hush: fix read builtin to not read ahead past eol and to not use insane amounts of stack. Testsuite updated. --- util-linux/readprofile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux') diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index f2bd3bb..02afedc 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c @@ -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); -- cgit v1.1