Make the sub-'argc' static to make it harder to overwrite thru a buffer

overflow.
This commit is contained in:
David E. O'Brien 2008-12-26 22:54:53 +00:00
parent 3f4f72bf2b
commit 76c4621653
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186504

View file

@ -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) */