]> 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)
committerChristopher James Halse Rogers <raof@ubuntu.com>
Tue, 8 Aug 2017 01:28:25 +0000 (11:28 +1000)
commitcc7d1fd16d14acf08a20fbe3a6426d2cb4878768
tree1e6d2bc83fcc135da78719b96f59d62b43615e3d
parenta7df0f5f3537d062dcf2f7d85cf2f919bf384b16
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