diff options
author | ho <> | 2003-03-16 12:18:21 +0000 |
---|---|---|
committer | ho <> | 2003-03-16 12:18:21 +0000 |
commit | a4c0f9de9c618e0271a7e122136bdfe50301a6d7 (patch) | |
tree | 92679b9e140a2b594f7238dbaf4556cb2da66d73 /src/lib/libcrypto/rand/rand_egd.c | |
parent | 68d910a736124944b061ef4eb6d3e07b4682389a (diff) | |
download | openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.tar.gz openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.tar.bz2 openbsd-a4c0f9de9c618e0271a7e122136bdfe50301a6d7.zip |
Less strcpy/strcat/sprintf. tdeval@ ok.
Diffstat (limited to 'src/lib/libcrypto/rand/rand_egd.c')
-rw-r--r-- | src/lib/libcrypto/rand/rand_egd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rand/rand_egd.c b/src/lib/libcrypto/rand/rand_egd.c index abc3ac27d5..96019c07a6 100644 --- a/src/lib/libcrypto/rand/rand_egd.c +++ b/src/lib/libcrypto/rand/rand_egd.c | |||
@@ -145,7 +145,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) | |||
145 | addr.sun_family = AF_UNIX; | 145 | addr.sun_family = AF_UNIX; |
146 | if (strlen(path) > sizeof(addr.sun_path)) | 146 | if (strlen(path) > sizeof(addr.sun_path)) |
147 | return (-1); | 147 | return (-1); |
148 | strcpy(addr.sun_path,path); | 148 | strlcpy(addr.sun_path,path,sizeof addr.sun_path); |
149 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); | 149 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); |
150 | fd = socket(AF_UNIX, SOCK_STREAM, 0); | 150 | fd = socket(AF_UNIX, SOCK_STREAM, 0); |
151 | if (fd == -1) return (-1); | 151 | if (fd == -1) return (-1); |