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