Date: Sun, 12 Mar 2017 11:41:48 -0700 From: Ngie Cooper <yaneurabeya@gmail.com> To: "Pedro F. Giffuni" <pfg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315164 - head/lib/libpam/modules/pam_exec Message-ID: <C694B152-3133-4BC2-ACDD-847F938B051C@gmail.com> In-Reply-To: <201703121741.v2CHfpSA070217@repo.freebsd.org> References: <201703121741.v2CHfpSA070217@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Mar 12, 2017, at 10:41, Pedro F. Giffuni <pfg@FreeBSD.org> wrote: >=20 > Author: pfg > Date: Sun Mar 12 17:41:51 2017 > New Revision: 315164 > URL: https://svnweb.freebsd.org/changeset/base/315164 >=20 > Log: > Revert r314780 > libpam: extra bounds checking through reallocarray(3). >=20 > It appears to be causing brokenness when reporting PAM_* environment > variables. This requires more investigation. >=20 > Reported by: lstewart >=20 > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c >=20 > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 16:55:18 201= 7 (r315163) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 17:41:51 201= 7 (r315164) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems =3D sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv =3D options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp =3D reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > + tmp =3D realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * Eep. nitems variable use here too (masking nitems macro). -Ngie=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C694B152-3133-4BC2-ACDD-847F938B051C>