projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2545f94
)
Fix checking the return value of getentropy()
author
Kurt Roeckx
<kurt@roeckx.be>
Sat, 2 Jun 2018 16:15:32 +0000
(18:15 +0200)
committer
Kurt Roeckx
<kurt@roeckx.be>
Sun, 3 Jun 2018 10:14:32 +0000
(12:14 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
GH: #6405
crypto/rand/rand_unix.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_unix.c
b/crypto/rand/rand_unix.c
index e698dfde651fbe69983ffc8450e8674a78d0f3d3..9f17494d118816af7eef2026300b1c0e439698e6 100644
(file)
--- a/
crypto/rand/rand_unix.c
+++ b/
crypto/rand/rand_unix.c
@@
-249,7
+249,7
@@
int syscall_random(void *buf, size_t buflen)
*/
p_getentropy.p = DSO_global_lookup("getentropy");
if (p_getentropy.p != NULL)
- return p_getentropy.f(buf, buflen);
+ return p_getentropy.f(buf, buflen)
== 0 ? buflen : 0
;
/* Linux supports this since version 3.17 */
# if defined(__linux) && defined(SYS_getrandom)