Index: base/sync_socket_win.cc |
diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc |
index e5088162433f2f402a8809c1342142c028e07341..e16b925bbdf000299566bab887f4235b95f652b5 100644 |
--- a/base/sync_socket_win.cc |
+++ b/base/sync_socket_win.cc |
@@ -5,6 +5,7 @@ |
#include "base/sync_socket.h" |
#include "base/logging.h" |
+#include "base/rand_util.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/win/scoped_handle.h" |
@@ -39,9 +40,8 @@ bool CreatePairImpl(HANDLE* socket_a, HANDLE* socket_b, bool overlapped) { |
flags |= FILE_FLAG_OVERLAPPED; |
do { |
- unsigned int rnd_name; |
- if (rand_s(&rnd_name) != 0) |
- return false; |
+ unsigned long rnd_name; |
+ RandBytes(&rnd_name, sizeof(rnd_name)); |
swprintf(name, kPipePathMax, |
kPipeNameFormat, |