diff options
author | Richard Levitte <levitte@openssl.org> | 2016-06-14 23:54:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-06-15 01:42:40 +0200 |
commit | a9b23465243b6d692bb0b419bdbe0b1f5a849e9c (patch) | |
tree | c5934845f9f18900a91015c3e6998fbfc4538a45 /crypto/asn1 | |
parent | 95fb422aceea9f48e3f5f04c745801fcbf953012 (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>
(cherry picked from commit bace847eae24f48adc6a967c6cce7f8d05bbeda3)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/tasn_dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 6bdcd5c542..cda19bb8d1 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -401,6 +401,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, 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); } |