summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
-rw-r--r--src/lib/libcrypto/asn1/tasn_dec.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c
index 0c2357c2bb..ac59cc7e21 100644
--- a/src/lib/libcrypto/asn1/tasn_dec.c
+++ b/src/lib/libcrypto/asn1/tasn_dec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_dec.c,v 1.84 2022/11/26 16:08:50 tb Exp $ */ 1/* $OpenBSD: tasn_dec.c,v 1.85 2023/04/28 17:59:53 job Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -736,7 +736,7 @@ static int
736asn1_item_d2i_sequence(ASN1_VALUE **pval, CBS *cbs, const ASN1_ITEM *it, 736asn1_item_d2i_sequence(ASN1_VALUE **pval, CBS *cbs, const ASN1_ITEM *it,
737 int tag_number, int tag_class, int optional, int depth) 737 int tag_number, int tag_class, int optional, int depth)
738{ 738{
739 CBS cbs_seq, cbs_seq_content, cbs_object; 739 CBS cbs_seq, cbs_seq_content;
740 int constructed, indefinite, optional_field; 740 int constructed, indefinite, optional_field;
741 const ASN1_TEMPLATE *errat = NULL; 741 const ASN1_TEMPLATE *errat = NULL;
742 const ASN1_TEMPLATE *seqat, *at; 742 const ASN1_TEMPLATE *seqat, *at;
@@ -878,14 +878,9 @@ asn1_item_d2i_sequence(ASN1_VALUE **pval, CBS *cbs, const ASN1_ITEM *it,
878 ASN1_template_free(pseqval, seqat); 878 ASN1_template_free(pseqval, seqat);
879 } 879 }
880 880
881 if (!CBS_get_bytes(cbs, &cbs_object, CBS_offset(&cbs_seq))) 881 if (!CBS_skip(cbs, CBS_offset(&cbs_seq)))
882 goto err; 882 goto err;
883 883
884 if (!asn1_enc_save(&aseq, &cbs_object, it)) {
885 ASN1error(ERR_R_MALLOC_FAILURE);
886 goto err;
887 }
888
889 if (asn1_cb != NULL && !asn1_cb(ASN1_OP_D2I_POST, &aseq, it, NULL)) { 884 if (asn1_cb != NULL && !asn1_cb(ASN1_OP_D2I_POST, &aseq, it, NULL)) {
890 ASN1error(ASN1_R_AUX_ERROR); 885 ASN1error(ASN1_R_AUX_ERROR);
891 goto err; 886 goto err;