From f158a3cf478b9adb18c07f3f2b322785ec3afb82 Mon Sep 17 00:00:00 2001 From: ronys Date: Sat, 14 Mar 2015 20:53:11 +0200 Subject: [PATCH] Fix for Fedora 22, applicable to all Linux builds From Jan Henning --- src/os/linux/rand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/linux/rand.cpp b/src/os/linux/rand.cpp index 068bf70..9fd726d 100644 --- a/src/os/linux/rand.cpp +++ b/src/os/linux/rand.cpp @@ -35,7 +35,7 @@ bool pws_os::GetRandomData(void *p, unsigned long len) ifstream is("/dev/urandom"); if (!is) return false; - return is.read(static_cast(p), len); + return is.read(static_cast(p), len).good(); } static void get_failsafe_rnd(char * &p, unsigned &slen) -- 2.4.2