From 79437fa0c9e88ebb0b52d0081ccd07545abf5a08 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 21 Apr 2017 10:50:37 +0200 Subject: [PATCH] auth: Use calloc in ssh_userauth_agent_pubkey() Signed-off-by: Andreas Schneider --- src/auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/auth.c b/src/auth.c index 43dd0d2b..8a686dc2 100644 --- a/src/auth.c +++ b/src/auth.c @@ -1222,11 +1222,10 @@ int ssh_userauth_agent_pubkey(ssh_session session, ssh_kbdint ssh_kbdint_new(void) { ssh_kbdint kbd; - kbd = malloc(sizeof(struct ssh_kbdint_struct)); + kbd = calloc(1, sizeof(struct ssh_kbdint_struct)); if (kbd == NULL) { return NULL; } - ZERO_STRUCTP(kbd); return kbd; }