summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/regerror.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-05-24 21:22:37 +0000
committerderaadt <deraadt@openbsd.org>2002-05-24 21:22:37 +0000
commit5af14704cf583f2bdbbe00069ed34254a82d104f (patch)
tree2e7b4fc407290059fd5e1ddb505637dcf41046e2 /lib/libc/regex/regerror.c
parentReplace strcpy() with strlcpy(). (diff)
downloadwireguard-openbsd-5af14704cf583f2bdbbe00069ed34254a82d104f.tar.xz
wireguard-openbsd-5af14704cf583f2bdbbe00069ed34254a82d104f.zip
try to use strlcpy and snprintf more; ok various
Diffstat (limited to 'lib/libc/regex/regerror.c')
-rw-r--r--lib/libc/regex/regerror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/regex/regerror.c b/lib/libc/regex/regerror.c
index da328c41f25..976a7d6bc4e 100644
--- a/lib/libc/regex/regerror.c
+++ b/lib/libc/regex/regerror.c
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
#else
-static char rcsid[] = "$OpenBSD: regerror.c,v 1.7 2002/02/16 21:27:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: regerror.c,v 1.8 2002/05/24 21:22:37 deraadt Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -139,7 +139,7 @@ size_t errbuf_size;
if (errcode&REG_ITOA) {
if (r->code != 0) {
assert(strlen(r->name) < sizeof(convbuf));
- (void) strcpy(convbuf, r->name);
+ (void) strlcpy(convbuf, r->name, sizeof convbuf);
} else
(void)sprintf(convbuf, "REG_0x%x", target);
s = convbuf;