From 551d3788241b34adb162efd63f6e7ace6afdcca1 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 10 Jan 2012 18:01:15 +0000 Subject: [PATCH] Fix an allocation size bug in ASN.1 tests ktest_make_sample_pa_pk_as_req_draft9 was allocating the wrong size of objects for the trustedCertifiers array. Fix it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25638 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/asn.1/ktest.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/tests/asn.1/ktest.c b/src/tests/asn.1/ktest.c index 27b1f624f..4af530d90 100644 --- a/src/tests/asn.1/ktest.c +++ b/src/tests/asn.1/ktest.c @@ -712,12 +712,9 @@ ktest_make_sample_pa_pk_as_req_draft9(krb5_pa_pk_as_req_draft9 *p) int i; ktest_make_sample_data(&p->signedAuthPack); - p->trustedCertifiers = - ealloc(4 * sizeof(krb5_external_principal_identifier *)); - for (i = 0; i < 3; i++) { - p->trustedCertifiers[i] = - ealloc(sizeof(krb5_external_principal_identifier)); - } + p->trustedCertifiers = ealloc(4 * sizeof(krb5_trusted_ca *)); + for (i = 0; i < 3; i++) + p->trustedCertifiers[i] = ealloc(sizeof(krb5_trusted_ca)); ktest_make_sample_trusted_ca_principalName(p->trustedCertifiers[0]); ktest_make_sample_trusted_ca_caName(p->trustedCertifiers[1]); ktest_make_sample_trusted_ca_issuerAndSerial(p->trustedCertifiers[2]); -- 2.26.2