summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-01-10 18:01:15 +0000
committerGreg Hudson <ghudson@mit.edu>2012-01-10 18:01:15 +0000
commit551d3788241b34adb162efd63f6e7ace6afdcca1 (patch)
treec6133bac6ac45747d4cb94db3b7807973372ea29 /src/tests
parent266f277b07ffae2cbb46e56387b5de0b1d5d7e02 (diff)
downloadkrb5-551d3788241b34adb162efd63f6e7ace6afdcca1.tar.gz
krb5-551d3788241b34adb162efd63f6e7ace6afdcca1.tar.xz
krb5-551d3788241b34adb162efd63f6e7ace6afdcca1.zip
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
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asn.1/ktest.c9
1 files 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]);