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
This commit is contained in:
parent
c44f58fce9
commit
94a1344578
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315164
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user