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 05:04:10 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127094/
-----------------------------------------------------------
(Updated Feb. 16, 2016, 9:04 p.m.)
Status
------
This change has been marked as submitted.
Review request for KDE Frameworks.
Changes
-------
Submitted with commit 47fd753a9a7e19a446896362528f69f76fd03029 by Michael Pyne to branch master.
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/3c839505/attachment.html>
More information about the Kde-frameworks-devel
mailing list