Fix an allocation size bug in ASN.1 tests
authorGreg Hudson <ghudson@mit.edu>
Tue, 10 Jan 2012 18:01:15 +0000 (18:01 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 10 Jan 2012 18:01:15 +0000 (18:01 +0000)
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

index 27b1f624f996de9984bd3ee4e31efc2cadb23062..4af530d906e778e3154a203a936c3b40c7ff3eef 100644 (file)
@@ -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]);