From: Volker Lendecke Date: Tue, 13 Jan 2026 07:51:29 +0000 (+0100) Subject: auth: Avoid a memset with calloc X-Git-Tag: tdb-1.4.15~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81eb0375425009d876dda811693942ca649d42c5;p=thirdparty%2Fsamba.git auth: Avoid a memset with calloc Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c index 88a909b7bd2..0fee228b381 100644 --- a/source3/auth/pampass.c +++ b/source3/auth/pampass.c @@ -148,12 +148,10 @@ static int smb_pam_conv(int num_msg, return PAM_CONV_ERR; } - reply = SMB_MALLOC_ARRAY(struct pam_response, num_msg); + reply = SMB_CALLOC_ARRAY(struct pam_response, num_msg); if (!reply) return PAM_CONV_ERR; - memset(reply, '\0', sizeof(struct pam_response) * num_msg); - for (replies = 0; replies < num_msg; replies++) { switch (msg[replies]->msg_style) { case PAM_PROMPT_ECHO_ON: