From bace847eae24f48adc6a967c6cce7f8d05bbeda3 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 14 Jun 2016 23:54:56 +0200 Subject: [PATCH] Always check that the value returned by asn1_do_adb() is non-NULL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Stephen Henson Reviewed-by: Emilia Käsper --- crypto/asn1/tasn_dec.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.34.1