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:
799c129
)
rand/randfile.c: rationalize __OpenBSD__ code path.
author
Andy Polyakov
<appro@openssl.org>
Tue, 20 Sep 2016 15:06:58 +0000
(17:06 +0200)
committer
Andy Polyakov
<appro@openssl.org>
Wed, 21 Sep 2016 19:09:07 +0000
(21:09 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/rand/randfile.c
patch
|
blob
|
history
diff --git
a/crypto/rand/randfile.c
b/crypto/rand/randfile.c
index 16cc27aa9b08f88dc90cac5334d02db8942278cc..dfec2c7d6b128cd9eddf555c0ffef4cd72870cf7 100644
(file)
--- a/
crypto/rand/randfile.c
+++ b/
crypto/rand/randfile.c
@@
-357,11
+357,7
@@
const char *RAND_file_name(char *buf, size_t size)
* available.
*/
- if (!buf[0])
- if (OPENSSL_strlcpy(buf, "/dev/arandom", size) >= size) {
- return NULL;
- }
- if (stat(buf, &sb) == -1)
+ if (!buf[0] || stat(buf, &sb) == -1)
if (OPENSSL_strlcpy(buf, "/dev/arandom", size) >= size) {
return NULL;
}