Date: Thu, 11 Dec 2008 18:32:05 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185940 - head/sys/sys Message-ID: <200812111832.mBBIW5v0072501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812111832.mBBIW5v0072501>