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) */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to