From 5673d4078777300b942056c5a7be655928325fe1 Mon Sep 17 00:00:00 2001 From: tedu Date: Fri, 18 Apr 2014 16:11:22 +0000 Subject: [PATCH] guenther would prefer more separation --- lib/libcrypto/asn1/tasn_dec.c | 2 ++ lib/libssl/src/crypto/asn1/tasn_dec.c | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.20.1