summaryrefslogtreecommitdiff
path: root/usr.bin/sed/main.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 15:47:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 15:47:13 +0000
commit1e46612221e29a3f44b51938a54918044e96afd0 (patch)
tree2117e55710cb70b7cc4f387766cc0e5d2ecf9ae2 /usr.bin/sed/main.c
parenta50175212238135f4447473edea4d8c46290faa2 (diff)
a few more strlcpy
Diffstat (limited to 'usr.bin/sed/main.c')
-rw-r--r--usr.bin/sed/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c
index 505f20cebe4..ffc7b769f29 100644
--- a/usr.bin/sed/main.c
+++ b/usr.bin/sed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.6 2002/02/16 21:27:52 millert Exp $ */
+/* $OpenBSD: main.c,v 1.7 2003/03/13 15:47:11 deraadt Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
@@ -45,7 +45,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94"; */
-static char *rcsid = "$OpenBSD: main.c,v 1.6 2002/02/16 21:27:52 millert Exp $";
+static char *rcsid = "$OpenBSD: main.c,v 1.7 2003/03/13 15:47:11 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -192,8 +192,8 @@ again:
if ((snprintf(string_ident,
sizeof(string_ident), "\"%s\"", script->s)) >=
sizeof(string_ident))
- (void)strcpy(string_ident +
- sizeof(string_ident) - 6, " ...\"");
+ strlcpy(string_ident +
+ sizeof(string_ident) - 6, " ...\"", 5);
fname = string_ident;
s = script->s;
state = ST_STRING;