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