From owner-svn-src-all@FreeBSD.ORG Fri Dec 26 22:54:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889D81065670; Fri, 26 Dec 2008 22:54:53 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 747608FC18; Fri, 26 Dec 2008 22:54:53 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQMsrDV052677; Fri, 26 Dec 2008 22:54:53 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQMsrbR052676; Fri, 26 Dec 2008 22:54:53 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812262254.mBQMsrbR052676@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Dec 2008 22:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186504 - head/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 22:54:53 -0000 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) */