diff options
author | Ben Laurie <ben@openssl.org> | 2008-06-04 11:01:43 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-06-04 11:01:43 +0000 |
commit | 5ce278a77bd7d23bcf965cfa37afb7b937c1a17d (patch) | |
tree | a69f3fe7e5a7e222cdd1e9314e671ffbcf79fc27 /crypto/asn1/tasn_prn.c | |
parent | 37cf49a3df4b0094c5d335008705518e93b2dad2 (diff) | |
download | openssl-new-5ce278a77bd7d23bcf965cfa37afb7b937c1a17d.tar.gz |
More type-checking.
Diffstat (limited to 'crypto/asn1/tasn_prn.c')
-rw-r--r-- | crypto/asn1/tasn_prn.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index d2830a5ead..361e93c59f 100644 --- a/crypto/asn1/tasn_prn.c +++ b/crypto/asn1/tasn_prn.c @@ -354,6 +354,8 @@ int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, { char *tname; ASN1_VALUE *skitem; + STACK_OF(ASN1_VALUE) *stack; + /* SET OF, SEQUENCE OF */ if (fname) { @@ -371,12 +373,13 @@ int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, fname) <= 0) return 0; } - for(i = 0; i < sk_num((STACK *)*fld); i++) + stack = (STACK_OF(ASN1_VALUE) *)*fld; + for(i = 0; i < sk_ASN1_VALUE_num(stack); i++) { if ((i > 0) && (BIO_puts(out, "\n") <= 0)) return 0; - skitem = (ASN1_VALUE *)sk_value((STACK *)*fld, i); + skitem = sk_ASN1_VALUE_value(stack, i); if (!asn1_item_print_ctx(out, &skitem, indent + 2, ASN1_ITEM_ptr(tt->item), NULL, NULL, 1, pctx)) return 0; |