8ae002
commit 705a79f82560ff6472cebed86aa5db04cdea3bce
8ae002
Author: Florian Weimer <fweimer@redhat.com>
8ae002
Date:   Wed Nov 30 14:59:27 2016 +0100
8ae002
8ae002
    libio: Limit buffer size to 8192 bytes [BZ #4099]
8ae002
    
8ae002
    This avoids overly large buffers with network file systems which report
8ae002
    very large block sizes.
8ae002
8ae002
Index: b/libio/filedoalloc.c
8ae002
===================================================================
8ae002
--- a/libio/filedoalloc.c
8ae002
+++ b/libio/filedoalloc.c
8ae002
@@ -121,7 +121,7 @@ _IO_file_doallocate (fp)
8ae002
 	    fp->_flags |= _IO_LINE_BUF;
8ae002
 	}
8ae002
 #if _IO_HAVE_ST_BLKSIZE
8ae002
-      if (st.st_blksize > 0)
8ae002
+      if (st.st_blksize > 0 && st.st_blksize < _IO_BUFSIZ)
8ae002
 	size = st.st_blksize;
8ae002
 #endif
8ae002
     }