]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/randutils.c: More paranoia in getrandom() call.
authorChristopher James Halse Rogers <raof@ubuntu.com>
Mon, 7 Aug 2017 06:10:51 +0000 (16:10 +1000)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Sep 2017 12:16:11 +0000 (14:16 +0200)
commit0e10ad091968dd9277274353fb6353f52fffe89e
tree79028a0dff4adc291d4e4540c3ad59c90c4cffb4
parent861f274862105cd30d4442fb63e24af0d2e57e66
lib/randutils.c: More paranoia in getrandom() call.

If getrandom() is called with nbytes ≥ 256 then it can return with less than the requested
bytes filled.

In this case we *could* adjust the buffer by the number of bytes actually read, but it's
simpler to just redo the call.
lib/randutils.c