outlen should be int * in out_utf8.
[openssl.git] / crypto / asn1 / tasn_utl.c
index 2e18f9f3f5832d9c3d019810dc99aea2c61d0e04..2a3f5db8f387257ae8d2ba495f590795f87b85b1 100644 (file)
@@ -102,7 +102,8 @@ int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it)
 {
        const ASN1_AUX *aux;
        int *lck, ret;
-       if(it->itype != ASN1_ITYPE_SEQUENCE) return 0;
+       if((it->itype != ASN1_ITYPE_SEQUENCE)
+          && (it->itype != ASN1_ITYPE_NDEF_SEQUENCE)) return 0;
        aux = it->funcs;
        if(!aux || !(aux->flags & ASN1_AFLG_REFCOUNT)) return 0;
        lck = offset2ptr(*pval, aux->ref_offset);
@@ -209,7 +210,7 @@ const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt, int
        if(!(tt->flags & ASN1_TFLG_ADB_MASK)) return tt;
 
        /* Else ANY DEFINED BY ... get the table */
-       adb = tt->item;
+       adb = ASN1_ADB_ptr(tt->item);
 
        /* Get the selector field */
        sfld = offset2ptr(*pval, adb->offset);