aboutsummaryrefslogtreecommitdiff
path: root/util-linux/readprofile.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-13 06:47:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-13 06:47:47 +0000
commitd67cef2425fb5e75b75d52d9a308da6d29cd7a0d (patch)
tree5d034f518dfae9a933a701e8c42da4acbf0cb42d /util-linux/readprofile.c
parentf5f75c5e82d47613847c356664e47c4be69e73aa (diff)
downloadbusybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.tar.gz
busybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.tar.bz2
busybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.zip
hush: fix read builtin to not read ahead past eol and to not use
insane amounts of stack. Testsuite updated.
Diffstat (limited to 'util-linux/readprofile.c')
-rw-r--r--util-linux/readprofile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index f2bd3bbae..02afedcf0 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -99,7 +99,7 @@ int readprofile_main(int argc, char **argv)
99 /* 99 /*
100 * Use an fd for the profiling buffer, to skip stdio overhead 100 * Use an fd for the profiling buffer, to skip stdio overhead
101 */ 101 */
102 len = INT_MAX; 102 len = MAXINT(ssize_t);
103 buf = xmalloc_open_read_close(proFile, &len); 103 buf = xmalloc_open_read_close(proFile, &len);
104 if (!optNative) { 104 if (!optNative) {
105 int entries = len/sizeof(*buf); 105 int entries = len/sizeof(*buf);