From owner-svn-src-head@FreeBSD.ORG Thu Dec 11 18:32:05 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8F41065672; Thu, 11 Dec 2008 18:32:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ED8C8FC1C; Thu, 11 Dec 2008 18:32:05 +0000 (UTC) (envelope-from ed@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 mBBIW5td072502; Thu, 11 Dec 2008 18:32:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBIW5v0072501; Thu, 11 Dec 2008 18:32:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812111832.mBBIW5v0072501@svn.freebsd.org> From: Ed Schouten Date: Thu, 11 Dec 2008 18:32:05 +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: r185940 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 18:32:05 -0000 Author: ed Date: Thu Dec 11 18:32:05 2008 New Revision: 185940 URL: http://svn.freebsd.org/changeset/base/185940 Log: Don't forget to add "npts" to rlimit_ident[] as well. When I added RLIMIT_NPTS, I forgot to add it to rlimit_ident[]. Make sure the rlimit_ident[] array is always RLIM_NLIMITS elements big. So if we ever forget to add new rlimits to this list again. it will contain a null pointer, instead of random data. Spotted by: rwatson Modified: head/sys/sys/resource.h Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Thu Dec 11 18:07:54 2008 (r185939) +++ head/sys/sys/resource.h Thu Dec 11 18:32:05 2008 (r185940) @@ -106,7 +106,7 @@ struct rusage { */ #ifdef _RLIMIT_IDENT -static char *rlimit_ident[] = { +static char *rlimit_ident[RLIM_NLIMITS] = { "cpu", "fsize", "data", @@ -118,6 +118,7 @@ static char *rlimit_ident[] = { "nofile", "sbsize", "vmem", + "npts", }; #endif