Date: Sun, 12 Mar 2017 17:41:51 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315164 - head/lib/libpam/modules/pam_exec Message-ID: <201703121741.v2CHfpSA070217@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sun Mar 12 17:41:51 2017 New Revision: 315164 URL: https://svnweb.freebsd.org/changeset/base/315164 Log: Revert r314780 libpam: extra bounds checking through reallocarray(3). It appears to be causing brokenness when reporting PAM_* environment variables. This requires more investigation. Reported by: lstewart 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 Sun Mar 12 16:55:18 2017 (r315163) +++ head/lib/libpam/modules/pam_exec/pam_exec.c Sun Mar 12 17:41:51 2017 (r315164) @@ -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 = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, + tmp = realloc(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?201703121741.v2CHfpSA070217>