[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Tue Jun 14 23:36:16 UTC 2016
The branch master has been updated
via fdcb499cc2cd57412e496302a4bca8c5d9f1a9c7 (commit)
via bace847eae24f48adc6a967c6cce7f8d05bbeda3 (commit)
from 4e3d2866b6e8e7a700ea22e05840a093bfd7a4b1 (commit)
- Log -----------------------------------------------------------------
commit fdcb499cc2cd57412e496302a4bca8c5d9f1a9c7
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Jun 15 01:31:14 2016 +0200
Change (!seqtt) to (seqtt == NULL)
Reviewed-by: Stephen Henson <steve at openssl.org>
Reviewed-by: Emilia Käsper <emilia at openssl.org>
commit bace847eae24f48adc6a967c6cce7f8d05bbeda3
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Jun 14 23:54:56 2016 +0200
Always check that the value returned by asn1_do_adb() is non-NULL
Reviewed-by: Stephen Henson <steve at openssl.org>
Reviewed-by: Emilia Käsper <emilia at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/tasn_dec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index aad838a..a1b0e28 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 == NULL)
+ continue;
pseqval = asn1_get_field_ptr(pval, seqtt);
asn1_template_free(pseqval, seqtt);
}
@@ -311,7 +313,7 @@ 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)
+ if (seqtt == NULL)
goto err;
pseqval = asn1_get_field_ptr(pval, seqtt);
/* Have we ran out of data? */
@@ -376,7 +378,7 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
for (; i < it->tcount; tt++, i++) {
const ASN1_TEMPLATE *seqtt;
seqtt = asn1_do_adb(pval, tt, 1);
- if (!seqtt)
+ if (seqtt == NULL)
goto err;
if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
ASN1_VALUE **pseqval;
More information about the openssl-commits
mailing list