summaryrefslogtreecommitdiff
path: root/sbin/swapctl/swapctl.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-09 03:13:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-09 03:13:49 +0000
commit806de81a5d7719f2316d641709fe3eaae8e6c587 (patch)
tree35672c1a2c13b68e28cb3f54131bb1058dff2145 /sbin/swapctl/swapctl.c
parent7ecb284739f3f5a91dea1828150f23f769fc98b7 (diff)
PATH_MAX+1 is wrong. Not cranking libc/libc_r majors over this, since they just got cranked a little while ago. discussion with millert
Diffstat (limited to 'sbin/swapctl/swapctl.c')
-rw-r--r--sbin/swapctl/swapctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/swapctl/swapctl.c b/sbin/swapctl/swapctl.c
index 78148c25006..56d01215381 100644
--- a/sbin/swapctl/swapctl.c
+++ b/sbin/swapctl/swapctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swapctl.c,v 1.3 2000/06/30 16:00:09 millert Exp $ */
+/* $OpenBSD: swapctl.c,v 1.4 2001/03/09 03:13:48 deraadt Exp $ */
/* $NetBSD: swapctl.c,v 1.9 1998/07/26 20:23:15 mycroft Exp $ */
/*
@@ -370,7 +370,7 @@ do_fstab()
priority = pri;
if ((s = strstr(fp->fs_mntops, NFSMNTPT)) != NULL) {
- char *t, cmd[2*PATH_MAX+sizeof(PATH_MOUNT)+2];
+ char *t, cmd[strlen(PATH_MOUNT)+1+PATH_MAX+1+PATH_MAX+1];
/*
* Skip this song and dance if we're only
@@ -396,7 +396,7 @@ do_fstab()
continue;
}
snprintf(cmd, sizeof(cmd), "%s %s %s",
- PATH_MOUNT, fp->fs_spec, spec);
+ PATH_MOUNT, fp->fs_spec, spec);
if (system(cmd) != 0) {
warnx("%s: mount failed", fp->fs_spec);
continue;