diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-11-30 14:59:27 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-11-30 14:59:27 +0100 |
commit | 705a79f82560ff6472cebed86aa5db04cdea3bce (patch) | |
tree | 37c952d4411aa2bcccf0556110d78e4e289ec6b9 /libio | |
parent | 934fc4773eec45ec31b03a0244d391cade53f210 (diff) | |
download | glibc-705a79f82560ff6472cebed86aa5db04cdea3bce.tar.gz glibc-705a79f82560ff6472cebed86aa5db04cdea3bce.tar.xz glibc-705a79f82560ff6472cebed86aa5db04cdea3bce.zip |
libio: Limit buffer size to 8192 bytes [BZ #4099]
This avoids overly large buffers with network file systems which report very large block sizes.
Diffstat (limited to 'libio')
-rw-r--r-- | libio/filedoalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 4f9d738968..ded0725356 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -94,7 +94,7 @@ _IO_file_doallocate (_IO_FILE *fp) fp->_flags |= _IO_LINE_BUF; } #if _IO_HAVE_ST_BLKSIZE - if (st.st_blksize > 0) + if (st.st_blksize > 0 && st.st_blksize < _IO_BUFSIZ) size = st.st_blksize; #endif } |