From: tedu Date: Fri, 18 Apr 2014 16:11:22 +0000 (+0000) Subject: guenther would prefer more separation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5673d4078777300b942056c5a7be655928325fe1;p=openbsd guenther would prefer more separation --- diff --git a/lib/libcrypto/asn1/tasn_dec.c b/lib/libcrypto/asn1/tasn_dec.c index 1ce40039b1b..be37ac0c966 100644 --- a/lib/libcrypto/asn1/tasn_dec.c +++ b/lib/libcrypto/asn1/tasn_dec.c @@ -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 diff --git a/lib/libssl/src/crypto/asn1/tasn_dec.c b/lib/libssl/src/crypto/asn1/tasn_dec.c index 1ce40039b1b..be37ac0c966 100644 --- a/lib/libssl/src/crypto/asn1/tasn_dec.c +++ b/lib/libssl/src/crypto/asn1/tasn_dec.c @@ -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