summaryrefslogtreecommitdiff
path: root/lib/libc/regex/regcomp.c
diff options
context:
space:
mode:
authorThierry Deval <tdeval@cvs.openbsd.org>2003-04-05 00:43:21 +0000
committerThierry Deval <tdeval@cvs.openbsd.org>2003-04-05 00:43:21 +0000
commit28816b14035bb08ad1d134a6d059b038e14eb7d8 (patch)
tree4cdd8655a357f40d8bfa4e236e802ffeb3ec3969 /lib/libc/regex/regcomp.c
parent89818c6c69a0745284f6b5368cadd229bfe9c8cb (diff)
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.c5
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);
}
/*