summaryrefslogtreecommitdiff
path: root/util-linux/readprofile.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-13 06:47:47 +0000
committerDenis Vlasenko2007-06-13 06:47:47 +0000
commitd67cef2425fb5e75b75d52d9a308da6d29cd7a0d (patch)
tree5d034f518dfae9a933a701e8c42da4acbf0cb42d /util-linux/readprofile.c
parentf5f75c5e82d47613847c356664e47c4be69e73aa (diff)
downloadbusybox-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.zip
busybox-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.tar.gz
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 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);