Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/stdio



On 31.01.2021 17:18, Jaromir Dolecek wrote:
> Module Name:	src
> Committed By:	jdolecek
> Date:		Sun Jan 31 16:18:22 UTC 2021
> 
> Modified Files:
> 	src/lib/libc/stdio: fread.c
> 
> Log Message:
> for unbuffered I/O arrange for the destination buffer to be filled in one
> go, instead of triggering long series of 1 byte read(2)s; this speeds up
> fread() several order of magnitudes for this case, directly proportional
> to the size of the supplied buffer
> 
> change adapted from OpenBSD rev. 1.19
> 
> fixes PR lib/55808 by Roland Illig
> 

While there it would be cool to apply FreeBSD and OpenBSD hardening for
invalid size x nmemb, checking for overflow. I propose to return EINVAL
in such case.

I planned to submit it a while ago for discussion.


Home | Main Index | Thread Index | Old Index