Date: Fri, 26 Dec 2008 22:54:53 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186504 - head/sbin/mount Message-ID: <200812262254.mBQMsrbR052676@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812262254.mBQMsrbR052676>