diff options
author | 2003-04-05 00:43:19 +0000 | |
---|---|---|
committer | 2003-04-05 00:43:19 +0000 | |
commit | 88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6 (patch) | |
tree | 614487de6ca6afb83aeefa99c5faf1f18f5632a4 /lib/libc/regex/regcomp.c | |
parent | two fixes; help from tedu & tdeval (diff) | |
download | wireguard-openbsd-88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6.tar.xz wireguard-openbsd-88a28a4cc3e139e5a30e0d9d121cbb3359acb1a6.zip |
strcpy/strcat -> strlcpy/strlcat
ok tedu@, hints by deraadt@ and millert@
Diffstat (limited to 'lib/libc/regex/regcomp.c')
-rw-r--r-- | lib/libc/regex/regcomp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 10224be9240..fc01ad0bb4b 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94"; #else -static char rcsid[] = "$OpenBSD: regcomp.c,v 1.8 2002/02/16 21:27:24 millert Exp $"; +static char rcsid[] = "$OpenBSD: regcomp.c,v 1.9 2003/04/05 00:43:20 tdeval Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -1285,8 +1285,7 @@ register char *cp; } cs->multis = np; - (void) strcpy(cs->multis + oldend - 1, cp); - cs->multis[cs->smultis - 1] = '\0'; + strlcpy(cs->multis + oldend - 1, cp, cs->smultis - oldend + 1); } /* |