diff options
author | markus <> | 2004-04-08 08:03:15 +0000 |
---|---|---|
committer | markus <> | 2004-04-08 08:03:15 +0000 |
commit | 40d673554117d24c9f46be721235d3e302c06e04 (patch) | |
tree | 341e7f38b840f3e503afb6e471123c0f2ba082c3 /src/lib/libcrypto/rand/rand_egd.c | |
parent | cbf88de39286be06cd20e0c65b6cb7633dce25a5 (diff) | |
download | openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.gz openbsd-40d673554117d24c9f46be721235d3e302c06e04.tar.bz2 openbsd-40d673554117d24c9f46be721235d3e302c06e04.zip |
merge 0.9.7d
Diffstat (limited to 'src/lib/libcrypto/rand/rand_egd.c')
-rw-r--r-- | src/lib/libcrypto/rand/rand_egd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rand/rand_egd.c b/src/lib/libcrypto/rand/rand_egd.c index 895967476e..6f742900a0 100644 --- a/src/lib/libcrypto/rand/rand_egd.c +++ b/src/lib/libcrypto/rand/rand_egd.c | |||
@@ -56,6 +56,7 @@ | |||
56 | 56 | ||
57 | #include <openssl/e_os2.h> | 57 | #include <openssl/e_os2.h> |
58 | #include <openssl/rand.h> | 58 | #include <openssl/rand.h> |
59 | #include <openssl/buffer.h> | ||
59 | 60 | ||
60 | /* | 61 | /* |
61 | * Query the EGD <URL: http://www.lothar.com/tech/crypto/>. | 62 | * Query the EGD <URL: http://www.lothar.com/tech/crypto/>. |
@@ -145,7 +146,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) | |||
145 | addr.sun_family = AF_UNIX; | 146 | addr.sun_family = AF_UNIX; |
146 | if (strlen(path) >= sizeof(addr.sun_path)) | 147 | if (strlen(path) >= sizeof(addr.sun_path)) |
147 | return (-1); | 148 | return (-1); |
148 | strlcpy(addr.sun_path,path,sizeof addr.sun_path); | 149 | BUF_strlcpy(addr.sun_path,path,sizeof addr.sun_path); |
149 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); | 150 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); |
150 | fd = socket(AF_UNIX, SOCK_STREAM, 0); | 151 | fd = socket(AF_UNIX, SOCK_STREAM, 0); |
151 | if (fd == -1) return (-1); | 152 | if (fd == -1) return (-1); |