summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/tasn_prn.c
diff options
context:
space:
mode:
authormiod <>2015-02-14 15:15:27 +0000
committermiod <>2015-02-14 15:15:27 +0000
commit33a440bc9926629e39cdff58bede114c91e390bb (patch)
tree94e94a16b5640d1e2450bb9d02f0815ab9b442f3 /src/lib/libcrypto/asn1/tasn_prn.c
parentee551a6db5becbad6ba25358f2f3cba5e1237149 (diff)
downloadopenbsd-33a440bc9926629e39cdff58bede114c91e390bb.tar.gz
openbsd-33a440bc9926629e39cdff58bede114c91e390bb.tar.bz2
openbsd-33a440bc9926629e39cdff58bede114c91e390bb.zip
Possible NULL pointer dereferences. Coverity CID 21719, 21732.
ok doug@ jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_prn.c')
-rw-r--r--src/lib/libcrypto/asn1/tasn_prn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c
index 844960fc77..c9fde96789 100644
--- a/src/lib/libcrypto/asn1/tasn_prn.c
+++ b/src/lib/libcrypto/asn1/tasn_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_prn.c,v 1.12 2015/02/07 13:19:15 doug Exp $ */ 1/* $OpenBSD: tasn_prn.c,v 1.13 2015/02/14 15:15:27 miod 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 */
@@ -301,7 +301,10 @@ asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, const ASN1_ITEM *it,
301 /* Print each field entry */ 301 /* Print each field entry */
302 for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) { 302 for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
303 const ASN1_TEMPLATE *seqtt; 303 const ASN1_TEMPLATE *seqtt;
304
304 seqtt = asn1_do_adb(fld, tt, 1); 305 seqtt = asn1_do_adb(fld, tt, 1);
306 if (seqtt == NULL)
307 return 0;
305 tmpfld = asn1_get_field_ptr(fld, seqtt); 308 tmpfld = asn1_get_field_ptr(fld, seqtt);
306 if (!asn1_template_print_ctx(out, tmpfld, indent + 2, 309 if (!asn1_template_print_ctx(out, tmpfld, indent + 2,
307 seqtt, pctx)) 310 seqtt, pctx))