summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/tasn_fre.c7
-rw-r--r--src/lib/libssl/src/crypto/asn1/tasn_fre.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_fre.c b/src/lib/libcrypto/asn1/tasn_fre.c
index 0369bf2339..d8d55a536c 100644
--- a/src/lib/libcrypto/asn1/tasn_fre.c
+++ b/src/lib/libcrypto/asn1/tasn_fre.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_fre.c,v 1.11 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: tasn_fre.c,v 1.12 2014/07/10 12:24:25 tedu Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -89,10 +89,9 @@ asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine)
89 ASN1_aux_cb *asn1_cb; 89 ASN1_aux_cb *asn1_cb;
90 int i; 90 int i;
91 91
92 if (!pval) 92 if (pval == NULL || *pval == NULL)
93 return;
94 if ((it->itype != ASN1_ITYPE_PRIMITIVE) && !*pval)
95 return; 93 return;
94
96 if (aux && aux->asn1_cb) 95 if (aux && aux->asn1_cb)
97 asn1_cb = aux->asn1_cb; 96 asn1_cb = aux->asn1_cb;
98 else 97 else
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_fre.c b/src/lib/libssl/src/crypto/asn1/tasn_fre.c
index 0369bf2339..d8d55a536c 100644
--- a/src/lib/libssl/src/crypto/asn1/tasn_fre.c
+++ b/src/lib/libssl/src/crypto/asn1/tasn_fre.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_fre.c,v 1.11 2014/06/12 15:49:27 deraadt Exp $ */ 1/* $OpenBSD: tasn_fre.c,v 1.12 2014/07/10 12:24:25 tedu Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -89,10 +89,9 @@ asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine)
89 ASN1_aux_cb *asn1_cb; 89 ASN1_aux_cb *asn1_cb;
90 int i; 90 int i;
91 91
92 if (!pval) 92 if (pval == NULL || *pval == NULL)
93 return;
94 if ((it->itype != ASN1_ITYPE_PRIMITIVE) && !*pval)
95 return; 93 return;
94
96 if (aux && aux->asn1_cb) 95 if (aux && aux->asn1_cb)
97 asn1_cb = aux->asn1_cb; 96 asn1_cb = aux->asn1_cb;
98 else 97 else