Date: Mon, 6 Mar 2017 18:14:15 -0800 From: Conrad Meyer <cem@freebsd.org> To: "Pedro F. Giffuni" <pfg@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec Message-ID: <CAG6CVpWA=mXUv6j8zxskRorqvm76bcXXoHN%2Bc9iVFu1d5yoQiA@mail.gmail.com> In-Reply-To: <201703061545.v26FjkNI027057@repo.freebsd.org> References: <201703061545.v26FjkNI027057@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for fixing the commit log this way. It makes 'svn annotate' history correct. IMO this is strongly preferable to a "forced commit." Best, Conrad On Mon, Mar 6, 2017 at 7:45 AM, Pedro F. Giffuni <pfg@freebsd.org> wrote: > Author: pfg > Date: Mon Mar 6 15:45:46 2017 > New Revision: 314780 > URL: https://svnweb.freebsd.org/changeset/base/314780 > > Log: > libpam: extra bounds checking through reallocarray(3). > > Reviewed by: des > MFC after: 1 week > > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > ============================================================================== > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems = sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * > + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > sizeof(*envlist)); > if (tmp == NULL) { > openpam_free_envlist(envlist); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpWA=mXUv6j8zxskRorqvm76bcXXoHN%2Bc9iVFu1d5yoQiA>