From d787d35d97a9df6bd1b747983280e747c7ff61b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 16 May 2014 14:37:39 +0200 Subject: [PATCH] mit-kdb: Use calloc so both authdata elements are zeroed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Sumit Bose Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- source4/kdc/mit-kdb/kdb_samba_policies.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/kdc/mit-kdb/kdb_samba_policies.c b/source4/kdc/mit-kdb/kdb_samba_policies.c index 2e9f9ef0c5a..7f9ab070617 100644 --- a/source4/kdc/mit-kdb/kdb_samba_policies.c +++ b/source4/kdc/mit-kdb/kdb_samba_policies.c @@ -363,7 +363,7 @@ krb5_error_code kdb_samba_db_sign_auth_data(krb5_context context, goto done; } - authdata = malloc(2 * sizeof(krb5_authdata *)); + authdata = calloc(2, sizeof(krb5_authdata *)); if (authdata == NULL) { goto done; } -- 2.34.1