summaryrefslogtreecommitdiff
path: root/lib/libcrypto/asn1/tasn_prn.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/asn1/tasn_prn.c')
-rw-r--r--lib/libcrypto/asn1/tasn_prn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libcrypto/asn1/tasn_prn.c b/lib/libcrypto/asn1/tasn_prn.c
index 844960fc776..c9fde96789f 100644
--- a/lib/libcrypto/asn1/tasn_prn.c
+++ b/lib/libcrypto/asn1/tasn_prn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tasn_prn.c,v 1.12 2015/02/07 13:19:15 doug Exp $ */
+/* $OpenBSD: tasn_prn.c,v 1.13 2015/02/14 15:15:27 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -301,7 +301,10 @@ asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, const ASN1_ITEM *it,
/* Print each field entry */
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
const ASN1_TEMPLATE *seqtt;
+
seqtt = asn1_do_adb(fld, tt, 1);
+ if (seqtt == NULL)
+ return 0;
tmpfld = asn1_get_field_ptr(fld, seqtt);
if (!asn1_template_print_ctx(out, tmpfld, indent + 2,
seqtt, pctx))