summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/mkhtemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/libreboot-utils/lib/mkhtemp.c')
-rw-r--r--util/libreboot-utils/lib/mkhtemp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c
index 191d657c..d22f526a 100644
--- a/util/libreboot-utils/lib/mkhtemp.c
+++ b/util/libreboot-utils/lib/mkhtemp.c
@@ -903,11 +903,12 @@ mkhtemp_fill_random(char *p, size_t xc)
for (chx = 0; chx < xc; chx++) {
retry_rand:
- /* on bsd: uses arc4random
- on linux: uses getrandom
- *never returns error*
+ /* /dev/urandom if enabled, OR:
+ * on bsd: uses arc4random
+ * on linux: uses getrandom
+ NOTE: *aborts* on error, regardless of method
*/
- r = rlong(); /* always returns successful */
+ r = rlong(); /* always *returns* successfully */
if (r >= limit)
goto retry_rand;