From: Noel Power Date: Wed, 16 Nov 2022 15:37:52 +0000 (+0000) Subject: nsswitch: Fix uninitialized memory when allocating pwdlastset_prelim X-Git-Tag: talloc-2.4.0~539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6284877ce07fc5ddf4f4e2d824013b645d6e12c;p=thirdparty%2Fsamba.git nsswitch: Fix uninitialized memory when allocating pwdlastset_prelim BUG: https://bugzilla.samba.org/show_bug.cgi?id=15224 Signed-off-by: Noel Power Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Nov 16 19:29:21 UTC 2022 on sn-devel-184 --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index 02a8aa8df98..06a8db21b69 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -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");