1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

nsswitch: Fix uninitialized memory when allocating pwdlastset_prelim

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15224
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 16 19:29:21 UTC 2022 on sn-devel-184

(cherry picked from commit f6284877ce)

Autobuild-User(v4-16-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-16-test): Wed Nov 23 13:52:37 UTC 2022 on sn-devel-184
This commit is contained in:
Noel Power 2022-11-16 15:37:52 +00:00 committed by Jule Anger
parent 399522d048
commit 33f74aea5d

View File

@ -3228,7 +3228,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
if (flags & PAM_PRELIM_CHECK) {
time_t *pwdlastset_prelim = NULL;
pwdlastset_prelim = talloc_array(NULL, time_t, 1);
pwdlastset_prelim = talloc_zero(NULL, time_t);
if (pwdlastset_prelim == NULL) {
_pam_log(ctx, LOG_CRIT,
"password - out of memory");