svn commit: r186504 - head/sbin/mount
David E. O'Brien
obrien at FreeBSD.org
Fri Dec 26 22:54:53 UTC 2008
Author: obrien
Date: Fri Dec 26 22:54:53 2008
New Revision: 186504
URL: http://svn.freebsd.org/changeset/base/186504
Log:
Make the sub-'argc' static to make it harder to overwrite thru a buffer
overflow.
Modified:
head/sbin/mount/mount.c
Modified: head/sbin/mount/mount.c
==============================================================================
--- head/sbin/mount/mount.c Fri Dec 26 22:47:11 2008 (r186503)
+++ head/sbin/mount/mount.c Fri Dec 26 22:54:53 2008 (r186504)
@@ -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) */
More information about the svn-src-head
mailing list