diff options
author | Ron Yorston <rmy@pobox.com> | 2018-02-23 09:09:35 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-02-23 09:09:35 +0000 |
commit | 7288179d1218f8e0308455d4d58346aec268eb2e (patch) | |
tree | 9c5381f96accfd5c85d05f66e239ddce1557d4fd /win32/mingw.c | |
parent | f46f3503fca50bfb397ed32d805158099a416f64 (diff) | |
download | busybox-w32-7288179d1218f8e0308455d4d58346aec268eb2e.tar.gz busybox-w32-7288179d1218f8e0308455d4d58346aec268eb2e.tar.bz2 busybox-w32-7288179d1218f8e0308455d4d58346aec268eb2e.zip |
win32: make /dev/urandom more random
Diffstat (limited to 'win32/mingw.c')
-rw-r--r-- | win32/mingw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 595042d85..86f649674 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -210,8 +210,7 @@ ssize_t mingw_read(int fd, void *buf, size_t count) | |||
210 | return count; | 210 | return count; |
211 | } | 211 | } |
212 | else if (fd == rand_fd) { | 212 | else if (fd == rand_fd) { |
213 | memset(buf, 0x5A, count); | 213 | return get_random_bytes(buf, count); |
214 | return count; | ||
215 | } | 214 | } |
216 | return read(fd, buf, count); | 215 | return read(fd, buf, count); |
217 | } | 216 | } |