pull up r19845 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 31 Aug 2007 21:38:28 +0000 (21:38 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 31 Aug 2007 21:38:28 +0000 (21:38 +0000)
commit50e096bc9d642b4b0f55a4582ec7f57559056a53
treef24deef35be1251fb3e5b5c243d642dc95c00068
parent46a7bb7e7d138b71a4416faaf59b2e86f7bb76aa
pull up r19845 from trunk

 r19845@cathode-dark-space:  epeisach | 2007-08-20 10:50:41 -0400
 ticket: new
 subject: read_entropy_from_device on partial read will not fill buffer
 tags: pullup

 read_entropy_from_device() will loop in read until the desired number
 of bytes are read from the device (/dev/random, /dev/urandom).  I have
 observed that for /dev/random, if there is not enough bits available
 for reading - it will return a partial read.  The code would loop in
 this case, but never advance the location to place the new bytes -
 hence the start of the buffer would be filled again - leaving the tail
 end as stack garbage.

ticket: 5666
version_fixed: 1.6.3

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19906 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/crypto/prng.c