diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:33:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:33:10 +0000 |
commit | 9456161d39067db41c74cfd10186fed54b537e2d (patch) | |
tree | 384d951c4a2b00f6665e48984ef74ba649239b02 /lib/libskey/skeysubr.c | |
parent | 8d8ae9f18ee2854b7924bde66d362d51ae8e7384 (diff) |
replace strcpy with strlcpy
Diffstat (limited to 'lib/libskey/skeysubr.c')
-rw-r--r-- | lib/libskey/skeysubr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c index 97b3f43e9e5..4b705209a4a 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -9,7 +9,7 @@ * * S/Key misc routines. * - * $OpenBSD: skeysubr.c,v 1.23 2002/02/16 21:27:28 millert Exp $ + * $OpenBSD: skeysubr.c,v 1.24 2002/05/24 21:33:09 deraadt Exp $ */ #include <stdio.h> @@ -92,7 +92,7 @@ keycrunch_md4(result, seed, passwd) buflen = strlen(seed) + strlen(passwd); if ((buf = (char *)malloc(buflen + 1)) == NULL) return(-1); - (void)strcpy(buf, seed); + (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); (void)strcat(buf, passwd); sevenbit(buf); @@ -137,7 +137,7 @@ keycrunch_md5(result, seed, passwd) buflen = strlen(seed) + strlen(passwd); if ((buf = (char *)malloc(buflen + 1)) == NULL) return(-1); - (void)strcpy(buf, seed); + (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); (void)strcat(buf, passwd); sevenbit(buf); @@ -182,7 +182,7 @@ keycrunch_sha1(result, seed, passwd) buflen = strlen(seed) + strlen(passwd); if ((buf = (char *)malloc(buflen + 1)) == NULL) return(-1); - (void)strcpy(buf, seed); + (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); (void)strcat(buf, passwd); sevenbit(buf); @@ -238,7 +238,7 @@ keycrunch_rmd160(result, seed, passwd) buflen = strlen(seed) + strlen(passwd); if ((buf = (char *)malloc(buflen + 1)) == NULL) return(-1); - (void)strcpy(buf, seed); + (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); (void)strcat(buf, passwd); sevenbit(buf); |