summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/extract.c10
-rw-r--r--usr.sbin/pkg_install/create/pl.c8
-rw-r--r--usr.sbin/pkg_install/lib/exec.c6
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c
index 000b743ec9d..a769b490165 100644
--- a/usr.sbin/pkg_install/add/extract.c
+++ b/usr.sbin/pkg_install/add/extract.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: extract.c,v 1.4 1998/01/23 01:15:37 gene Exp $ */
+/* $OpenBSD: extract.c,v 1.5 1998/06/23 23:17:16 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: extract.c,v 1.4 1998/01/23 01:15:37 gene Exp $";
+static const char *rcsid = "$OpenBSD: extract.c,v 1.5 1998/06/23 23:17:16 millert Exp $";
#endif
/*
@@ -104,7 +104,7 @@ extract_plist(char *home, Package *pkg)
add_count = snprintf(&perm_args[perm_count],
maxargs - perm_count,
"'%s' ", p->name);
- if (add_count > maxargs - perm_count)
+ if (add_count >= maxargs - perm_count)
barf("oops, miscounted strings!");
perm_count += add_count;
if (p->name[0] == '/') {
@@ -121,13 +121,13 @@ extract_plist(char *home, Package *pkg)
add_count = snprintf(&where_args[where_count],
maxargs - where_count,
" %s", p->name);
- if (add_count > maxargs - where_count)
+ if (add_count >= maxargs - where_count)
barf("oops, miscounted strings!");
where_count += add_count;
add_count = snprintf(&perm_args[perm_count],
maxargs - perm_count,
"'%s' ", p->name);
- if (add_count > maxargs - perm_count)
+ if (add_count >= maxargs - perm_count)
barf("oops, miscounted strings!");
perm_count += add_count;
if (p->name[0] == '/') {
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c
index 15df3e6e622..fd72b88d666 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.2 1996/06/04 08:43:36 niklas Exp $ */
+/* $OpenBSD: pl.c,v 1.3 1998/06/23 23:17:22 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: pl.c,v 1.2 1996/06/04 08:43:36 niklas Exp $";
+static const char *rcsid = "$OpenBSD: pl.c,v 1.3 1998/06/23 23:17:22 millert Exp $";
#endif
/*
@@ -171,7 +171,7 @@ copy_plist(char *home, Package *plist)
p->name);
last_chdir = home;
}
- if (add_count > maxargs - where_count)
+ if (add_count >= maxargs - where_count)
barf("oops, miscounted strings!");
where_count += add_count;
}
@@ -205,7 +205,7 @@ copy_plist(char *home, Package *plist)
" -C %s %s",
mythere ? mythere : where,
p->name);
- if (add_count > maxargs - where_count)
+ if (add_count >= maxargs - where_count)
barf("oops, miscounted strings!");
where_count += add_count;
last_chdir = (mythere ? mythere : where);
diff --git a/usr.sbin/pkg_install/lib/exec.c b/usr.sbin/pkg_install/lib/exec.c
index 2fefd6006b9..175925c28ed 100644
--- a/usr.sbin/pkg_install/lib/exec.c
+++ b/usr.sbin/pkg_install/lib/exec.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: exec.c,v 1.2 1996/06/04 08:43:41 niklas Exp $ */
+/* $OpenBSD: exec.c,v 1.3 1998/06/23 23:17:20 millert Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: exec.c,v 1.2 1996/06/04 08:43:41 niklas Exp $";
+static const char *rcsid = "$OpenBSD: exec.c,v 1.3 1998/06/23 23:17:20 millert Exp $";
#endif
/*
@@ -47,7 +47,7 @@ vsystem(const char *fmt, ...)
}
va_start(args, fmt);
- if (vsnprintf(cmd, maxargs, fmt, args) > maxargs) {
+ if (vsnprintf(cmd, maxargs, fmt, args) >= maxargs) {
whinge("vsystem args are too long");
return 1;
}