diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS index 2e3a00e02..52357f82e 100644 --- a/doc/CONTRIBUTORS +++ b/doc/CONTRIBUTORS @@ -99,6 +99,7 @@ you believe you should be listed, please send a note to sudo@sudo.ws. Nieusma, Jeff Nikitser, Peter A. Nussel, Ludwig + Ouellet, Jean-Philippe Paquet, Eric Paradis, Chantal Percival, Ted diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c index bb034c9d8..8749e2dc3 100644 --- a/plugins/sudoers/auth/pam.c +++ b/plugins/sudoers/auth/pam.c @@ -315,9 +315,8 @@ converse(int num_msg, PAM_CONST struct pam_message **msg, int ret = PAM_AUTH_ERR; debug_decl(converse, SUDO_DEBUG_AUTH) - if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL) + if ((*response = calloc(num_msg, sizeof(struct pam_response))) == NULL) debug_return_int(PAM_SYSTEM_ERR); - memset(*response, 0, num_msg * sizeof(struct pam_response)); for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++) { type = SUDO_CONV_PROMPT_ECHO_OFF;