diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-06-13 20:46:30 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-06-13 20:46:30 +0000 |
commit | 21b25ed4b83334b0296aa5b33a250f1f7488de4c (patch) | |
tree | 79e1de92a8f63701e4c4f7d2aa44c552d8879626 /crypto/rand/randfile.c | |
parent | 58f41a926a73bd5c49beb91991b486d4e0b544f5 (diff) |
PR: 1952
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve@openssl.org
ECDH negotiation bug.
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r-- | crypto/rand/randfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 4723feecaf..7dc4ceae8e 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -177,8 +177,8 @@ int RAND_write_file(const char *file) i=stat(file,&sb); if (i != -1) { -#if defined(S_IFBLK) && defined(S_IFCHR) - if (sb.st_mode & (S_IFBLK | S_IFCHR)) { +#if defined(S_ISBLK) && defined(S_ISCHR) + if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { /* this file is a device. we don't write back to it. * we "succeed" on the assumption this is some sort * of random device. Otherwise attempting to write to |