summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-06-14 23:54:56 +0200
committerRichard Levitte <levitte@openssl.org>2016-06-15 01:36:11 +0200
commitbace847eae24f48adc6a967c6cce7f8d05bbeda3 (patch)
treecfb2129513a12ce1b720a9ca9f31846345328945 /crypto/asn1
parent4e3d2866b6e8e7a700ea22e05840a093bfd7a4b1 (diff)
Always check that the value returned by asn1_do_adb() is non-NULL
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/tasn_dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index aad838a083..64518ee24e 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -301,6 +301,8 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
const ASN1_TEMPLATE *seqtt;
ASN1_VALUE **pseqval;
seqtt = asn1_do_adb(pval, tt, 1);
+ if (!seqtt)
+ continue;
pseqval = asn1_get_field_ptr(pval, seqtt);
asn1_template_free(pseqval, seqtt);
}