summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-12-26 22:54:53 +0000
committerobrien <obrien@FreeBSD.org>2008-12-26 22:54:53 +0000
commitff0e186a51698053fbe3b75af8d908c95e62986f (patch)
tree2ada61b1e96ac300891413bb3fb6ec1a0c052340 /sbin/mount
parent6c05275d0d10be09dace3e204b580dce3dd2f594 (diff)
downloadFreeBSD-src-ff0e186a51698053fbe3b75af8d908c95e62986f.zip
FreeBSD-src-ff0e186a51698053fbe3b75af8d908c95e62986f.tar.gz
Make the sub-'argc' static to make it harder to overwrite thru a buffer
overflow.
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 38a1c8a..950ac58 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -503,9 +503,10 @@ int
mountfs(const char *vfstype, const char *spec, const char *name, int flags,
const char *options, const char *mntopts)
{
+ static int argc;
char *argv[MAX_ARGS];
struct statfs sf;
- int argc, i, ret;
+ int i, ret;
char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX];
/* resolve the mountpoint with realpath(3) */
OpenPOWER on IntegriCloud