From 94ca17210b10a0c0cc67bf9449d4f962bebd5cfb Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 9 May 2006 19:36:46 +0000 Subject: [PATCH] * send_tgs.c (krb5_send_tgs): Fix memory allocation size when padata is provided. ticket: 3714 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17988 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/send_tgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/send_tgs.c b/src/lib/krb5/krb/send_tgs.c index 8fc60212c..aa881e16f 100644 --- a/src/lib/krb5/krb/send_tgs.c +++ b/src/lib/krb5/krb/send_tgs.c @@ -228,7 +228,7 @@ krb5_send_tgs(krb5_context context, krb5_flags kdcoptions, krb5_pa_data * const * counter; register unsigned int i = 0; for (counter = padata; *counter; counter++, i++); - combined_padata = (krb5_pa_data **)malloc(i+2); + combined_padata = malloc((i+2) * sizeof(*combined_padata)); if (!combined_padata) { krb5_xfree(ap_req_padata.contents); retval = ENOMEM; -- 2.26.2