summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/asn1/tasn_dec.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c
index f3e032c1c1..8732ab53cf 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.63 2022/05/10 18:40:06 jsing Exp $ */ 1/* $OpenBSD: tasn_dec.c,v 1.64 2022/05/12 19:11:14 jsing 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 */
@@ -249,7 +249,6 @@ asn1_item_ex_d2i_sequence(ASN1_VALUE **pval, const unsigned char **in, long len,
249 ASN1_aux_cb *asn1_cb = NULL; 249 ASN1_aux_cb *asn1_cb = NULL;
250 char seq_eoc, seq_nolen, cst, isopt; 250 char seq_eoc, seq_nolen, cst, isopt;
251 const unsigned char *p = NULL, *q; 251 const unsigned char *p = NULL, *q;
252 long tmplen;
253 int i; 252 int i;
254 int ret = 0; 253 int ret = 0;
255 254
@@ -261,7 +260,6 @@ asn1_item_ex_d2i_sequence(ASN1_VALUE **pval, const unsigned char **in, long len,
261 asn1_cb = aux->asn1_cb; 260 asn1_cb = aux->asn1_cb;
262 261
263 p = *in; 262 p = *in;
264 tmplen = len;
265 263
266 /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */ 264 /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
267 if (tag == -1) { 265 if (tag == -1) {
@@ -276,13 +274,7 @@ asn1_item_ex_d2i_sequence(ASN1_VALUE **pval, const unsigned char **in, long len,
276 goto err; 274 goto err;
277 } else if (ret == -1) 275 } else if (ret == -1)
278 return -1; 276 return -1;
279 if (aux && (aux->flags & ASN1_AFLG_BROKEN)) { 277 seq_nolen = seq_eoc;
280 len = tmplen - (p - *in);
281 seq_nolen = 1;
282 }
283 /* If indefinite we don't do a length check */
284 else
285 seq_nolen = seq_eoc;
286 if (!cst) { 278 if (!cst) {
287 ASN1error(ASN1_R_SEQUENCE_NOT_CONSTRUCTED); 279 ASN1error(ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
288 goto err; 280 goto err;