summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2008-06-04 13:01:43 +0200
committerBen Laurie <ben@openssl.org>2008-06-04 13:01:43 +0200
commit5ce278a77bd7d23bcf965cfa37afb7b937c1a17d (patch)
treea69f3fe7e5a7e222cdd1e9314e671ffbcf79fc27 /crypto/asn1/tasn_dec.c
parentAvoid name clash. (diff)
downloadopenssl-5ce278a77bd7d23bcf965cfa37afb7b937c1a17d.tar.xz
openssl-5ce278a77bd7d23bcf965cfa37afb7b937c1a17d.zip
More type-checking.
Diffstat (limited to 'crypto/asn1/tasn_dec.c')
-rw-r--r--crypto/asn1/tasn_dec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index f4831440fa..6f3ab00b36 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -668,11 +668,12 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
else
{
/* We've got a valid STACK: free up any items present */
- STACK *sktmp = (STACK *)*val;
+ STACK_OF(ASN1_VALUE) *sktmp
+ = (STACK_OF(ASN1_VALUE) *)*val;
ASN1_VALUE *vtmp;
- while(sk_num(sktmp) > 0)
+ while(sk_ASN1_VALUE_num(sktmp) > 0)
{
- vtmp = (ASN1_VALUE *)sk_pop(sktmp);
+ vtmp = sk_ASN1_VALUE_pop(sktmp);
ASN1_item_ex_free(&vtmp,
ASN1_ITEM_ptr(tt->item));
}
@@ -713,7 +714,8 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
goto err;
}
len -= p - q;
- if (!sk_push((STACK *)*val, (char *)skfield))
+ if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val,
+ skfield))
{
ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
ERR_R_MALLOC_FAILURE);