Review Request 127094: Don't use up 16K of /dev/urandom to seed rand() in KRandom

Michael Pyne mpyne at kde.org
Wed Feb 17 03:26:23 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127094/
-----------------------------------------------------------

Review request for KDE Frameworks.


Bugs: 359485
    https://bugs.kde.org/show_bug.cgi?id=359485


Repository: kcoreaddons


Description
-------

A bug reporter notes that KRandom reads 16K from /dev/urandom when seeding its RNG (which is just the libc RNG). This is because we simply use QFile, which buffers by default, the fix is to avoid buffering the output of this special file.

While the effect of reading the extra 16K-4 bytes should not be severe (I would not expect a modern OS to return bytes that utilize raw entropy) there's no reason to do it wrong either.


Diffs
-----

  src/lib/randomness/krandom.cpp da78388 

Diff: https://git.reviewboard.kde.org/r/127094/diff/


Testing
-------

Compiles and installs, applications still seem to run.


Thanks,

Michael Pyne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160217/3ce39f4f/attachment.html>


More information about the Kde-frameworks-devel mailing list