diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-29 18:53:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-29 18:53:16 +0000 |
commit | a635784ab8adb7a7d4021b0af3c80fdbdbaea47d (patch) | |
tree | a8c5340f808cfbc3224a43e5fc98c2b3669436b9 | |
parent | 95e3d5de54be4b8cda6c95d78154f6371186f1c2 (diff) |
strlcat bounds
-rw-r--r-- | lib/libc/rpc/clnt_perror.c | 4 | ||||
-rw-r--r-- | lib/libskey/skeysubr.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 70b82973a78..0dc8d83ff16 100644 --- a/lib/libc/rpc/clnt_perror.c +++ b/lib/libc/rpc/clnt_perror.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.13 2001/09/15 13:51:00 deraadt Exp $"; +static char *rcsid = "$OpenBSD: clnt_perror.c,v 1.14 2002/05/29 18:53:14 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -139,7 +139,7 @@ clnt_sperror(rpch, s) break; } strstart[CLNT_PERROR_BUFLEN-2] = '\0'; - strcat(strstart, "\n"); + strlcat(strstart, "\n", CLNT_PERROR_BUFLEN); return (strstart); truncated: diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c index 4b705209a4a..1b9cce1980a 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -9,7 +9,7 @@ * * S/Key misc routines. * - * $OpenBSD: skeysubr.c,v 1.24 2002/05/24 21:33:09 deraadt Exp $ + * $OpenBSD: skeysubr.c,v 1.25 2002/05/29 18:53:15 deraadt Exp $ */ #include <stdio.h> @@ -94,7 +94,7 @@ keycrunch_md4(result, seed, passwd) return(-1); (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); - (void)strcat(buf, passwd); + (void)strlcat(buf, passwd, buflen + 1); sevenbit(buf); } else { buf = result; @@ -139,7 +139,7 @@ keycrunch_md5(result, seed, passwd) return(-1); (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); - (void)strcat(buf, passwd); + (void)strlcat(buf, passwd, buflen + 1); sevenbit(buf); } else { buf = result; @@ -184,7 +184,7 @@ keycrunch_sha1(result, seed, passwd) return(-1); (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); - (void)strcat(buf, passwd); + (void)strlcat(buf, passwd, buflen + 1); sevenbit(buf); } else { buf = result; @@ -240,7 +240,7 @@ keycrunch_rmd160(result, seed, passwd) return(-1); (void)strlcpy(buf, seed, buflen + 1); lowcase(buf); - (void)strcat(buf, passwd); + (void)strlcat(buf, passwd, buflen + 1); sevenbit(buf); } else { buf = result; |