Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 8c6eceb8266a1a48a7a1a15f03225d3ca82b1f6e 1 parent 934f9f2
ghudson authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/tests/asn.1/ktest.c
View
9 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]);
Please sign in to comment.
Something went wrong with that request. Please try again.