arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh988869.patch

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