svn rev #25638: trunk/src/tests/asn.1/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Jan 10 13:01:15 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25638
Commit By: ghudson
Log Message:
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.


Changed Files:
U   trunk/src/tests/asn.1/ktest.c
Modified: trunk/src/tests/asn.1/ktest.c
===================================================================
--- trunk/src/tests/asn.1/ktest.c	2012-01-10 17:52:37 UTC (rev 25637)
+++ trunk/src/tests/asn.1/ktest.c	2012-01-10 18:01:15 UTC (rev 25638)
@@ -712,12 +712,9 @@
     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]);



More information about the cvs-krb5 mailing list