summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/create
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-04-04 08:56:02 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-04-04 08:56:02 +0000
commitdf767a3328525b26a79f2a28f9984a9259766282 (patch)
tree1c7d7fd6c5f59e11b46e5779f919d0654e080ee8 /usr.sbin/pkg_install/create
parent8f22089b34ec737d4331b517d8cf690df9544655 (diff)
some more strcpy/strcat -> strlcpy/strlcat conversions
ok and tweaks by ho@
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r--usr.sbin/pkg_install/create/main.c6
-rw-r--r--usr.sbin/pkg_install/create/pl.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index d3ff7c44439..f39e5876e5e 100644
--- a/usr.sbin/pkg_install/create/main.c
+++ b/usr.sbin/pkg_install/create/main.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: main.c,v 1.10 2002/02/16 21:28:06 millert Exp $ */
+/* $OpenBSD: main.c,v 1.11 2003/04/04 08:56:01 avsm Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: main.c,v 1.10 2002/02/16 21:28:06 millert Exp $";
+static const char *rcsid = "$OpenBSD: main.c,v 1.11 2003/04/04 08:56:01 avsm Exp $";
#endif
/*
@@ -91,7 +91,7 @@ main(int argc, char **argv)
break;
case 't':
- strcpy(PlayPen, optarg);
+ strlcpy(PlayPen, optarg, PlayPenSize);
break;
case 'X':
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c
index f40926efa3e..66e615a58af 100644
--- a/usr.sbin/pkg_install/create/pl.c
+++ b/usr.sbin/pkg_install/create/pl.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: pl.c,v 1.7 2001/06/06 20:03:08 espie Exp $ */
+/* $OpenBSD: pl.c,v 1.8 2003/04/04 08:56:01 avsm Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: pl.c,v 1.7 2001/06/06 20:03:08 espie Exp $";
+static const char *rcsid = "$OpenBSD: pl.c,v 1.8 2003/04/04 08:56:01 avsm Exp $";
#endif
/*
@@ -98,14 +98,14 @@ trylink(const char *from, const char *to)
#define TOOBIG(str) strlen(str) + 6 + strlen(home) + where_count > maxargs
#define PUSHOUT() /* push out string */ \
if (where_count > sizeof(STARTSTRING)-1) { \
- strcat(where_args, "|tar xpf -"); \
+ strlcat(where_args, "|tar xpf -", maxargs); \
if (system(where_args)) { \
cleanup(0); \
errx(2, "can't invoke tar pipeline"); \
} \
memset(where_args, 0, maxargs); \
last_chdir = NULL; \
- strcpy(where_args, STARTSTRING); \
+ strlcpy(where_args, STARTSTRING, maxargs); \
where_count = sizeof(STARTSTRING)-1; \
}
@@ -134,7 +134,7 @@ copy_plist(char *home, package_t *plist)
}
memset(where_args, 0, maxargs);
- strcpy(where_args, STARTSTRING);
+ strlcpy(where_args, STARTSTRING, maxargs);
where_count = sizeof(STARTSTRING)-1;
last_chdir = 0;