mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
libio: Limit buffer size to 8192 bytes [BZ #4099]
This avoids overly large buffers with network file systems which report very large block sizes.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user