From ff0e186a51698053fbe3b75af8d908c95e62986f Mon Sep 17 00:00:00 2001 From: obrien Date: Fri, 26 Dec 2008 22:54:53 +0000 Subject: Make the sub-'argc' static to make it harder to overwrite thru a buffer overflow. --- sbin/mount/mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sbin/mount') 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) */ -- cgit v1.1