guenther would prefer more separation
authortedu <tedu@openbsd.org>
Fri, 18 Apr 2014 16:11:22 +0000 (16:11 +0000)
committertedu <tedu@openbsd.org>
Fri, 18 Apr 2014 16:11:22 +0000 (16:11 +0000)
lib/libcrypto/asn1/tasn_dec.c
lib/libssl/src/crypto/asn1/tasn_dec.c

index 1ce4003..be37ac0 100644 (file)
@@ -171,11 +171,13 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
 
        if (!pval)
                return 0;
+
        /* always start fresh */
        if (*pval) {
                ASN1_item_ex_free(pval, it);
                *pval = NULL;
        }
+
        if (aux && aux->asn1_cb)
                asn1_cb = aux->asn1_cb;
        else
index 1ce4003..be37ac0 100644 (file)
@@ -171,11 +171,13 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
 
        if (!pval)
                return 0;
+
        /* always start fresh */
        if (*pval) {
                ASN1_item_ex_free(pval, it);
                *pval = NULL;
        }
+
        if (aux && aux->asn1_cb)
                asn1_cb = aux->asn1_cb;
        else