summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/cpio.c6
-rw-r--r--bin/pax/pat_rep.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
index d6e516fe391..c9d4ef9bca1 100644
--- a/bin/pax/cpio.c
+++ b/bin/pax/cpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpio.c,v 1.9 2002/02/19 19:39:35 millert Exp $ */
+/* $OpenBSD: cpio.c,v 1.10 2002/06/09 02:35:27 itojun Exp $ */
/* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)cpio.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: cpio.c,v 1.9 2002/02/19 19:39:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: cpio.c,v 1.10 2002/06/09 02:35:27 itojun Exp $";
#endif
#endif /* not lint */
@@ -174,7 +174,7 @@ cpio_endwr(void)
last.nlen = sizeof(TRAILER) - 1;
last.type = PAX_REG;
last.sb.st_nlink = 1;
- (void)strcpy(last.name, TRAILER);
+ (void)strlcpy(last.name, TRAILER, sizeof(last.name));
return((*frmt->wr)(&last));
}
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index f88ce717c12..b0f53cfe620 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pat_rep.c,v 1.17 2002/02/19 19:39:35 millert Exp $ */
+/* $OpenBSD: pat_rep.c,v 1.18 2002/06/09 02:35:27 itojun Exp $ */
/* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.17 2002/02/19 19:39:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.18 2002/06/09 02:35:27 itojun Exp $";
#endif
#endif /* not lint */
@@ -880,7 +880,7 @@ rep_name(char *name, int *nlen, int prnt)
* (the user already saw that substitution go by)
*/
pt = rephead;
- (void)strcpy(buf1, name);
+ (void)strlcpy(buf1, name, sizeof(buf1));
inpt = buf1;
outpt = nname;
endpt = outpt + PAXPATHLEN;
@@ -990,7 +990,7 @@ rep_name(char *name, int *nlen, int prnt)
*/
if (*nname == '\0')
return(1);
- *nlen = strlcpy(name, nname, sizeof(nname));
+ *nlen = strlcpy(name, nname, sizeof(name));
}
return(0);
}