diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2021-11-14 23:00:00 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-11-22 14:43:44 +0100 |
commit | 7f608e4b1d9473258445144ba66216fb0e63aebe (patch) | |
tree | 9a74756f29a724e782f9469390dc7230ab0d0777 /crypto/asn1 | |
parent | aba9943fef8dcc8416ac9a219c97c616c1fd6344 (diff) |
asn1_item_embed_d2i: fix th return check
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17028)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/tasn_dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index eff67d87fc..11198087a5 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -648,9 +648,9 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val, break; } skfield = NULL; - if (!asn1_item_embed_d2i(&skfield, &p, len, + if (asn1_item_embed_d2i(&skfield, &p, len, ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx, - depth, libctx, propq)) { + depth, libctx, propq) <= 0) { ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR); /* |skfield| may be partially allocated despite failure. */ ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item)); |