Bug#636266: libc6: fread() reads more than specified number of bytes

2011-08-03 Thread Philipp Marek
On Tuesday 02 August 2011, Jonathan Nieder wrote: Not sure what libc can do about that. Maybe the kernel could say, Please, do not buffer when reading this file and libc could respect that. But fundamentally, buffering is what fread is all about, ... In the C and POSIX standards, the

Bug#636266: libc6: fread() reads more than specified number of bytes

2011-08-02 Thread Jonathan Nieder
# complex severity 636266 wishlist retitle 636266 libc6: fread(buf, 1, 1) from urandom consumes 4096 bytes of entropy tags 636266 + upstream quit Hi Philipp, Ph. Marek wrote: fopen()/fread() is used by some software packages (I noticed it via ECL) to read data from /dev/urandom. But

Bug#636266: libc6: fread() reads more than specified number of bytes

2011-08-01 Thread Ph. Marek
Package: libc6 Version: 2.13-10 Severity: normal fopen()/fread() is used by some software packages (I noticed it via ECL) to read data from /dev/urandom. But fread() reads more bytes than specified (rounded up to 4096!), thereby decreasing the available entropy by a large amount. To test,