diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 0131e3c27c..103774fc19 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.57 2022/05/04 10:57:48 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.58 2022/05/05 19:18:56 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 | */ |
@@ -1049,9 +1049,10 @@ asn1_check_tag_cbs(CBS *cbs, size_t *out_len, int *out_tag, uint8_t *out_class, | |||
1049 | char *out_indefinite, char *out_constructed, int expected_tag, | 1049 | char *out_indefinite, char *out_constructed, int expected_tag, |
1050 | int expected_class, char optional) | 1050 | int expected_class, char optional) |
1051 | { | 1051 | { |
1052 | uint32_t tag_number, length; | ||
1053 | int constructed, indefinite; | 1052 | int constructed, indefinite; |
1053 | uint32_t tag_number; | ||
1054 | uint8_t tag_class; | 1054 | uint8_t tag_class; |
1055 | size_t length; | ||
1055 | 1056 | ||
1056 | if (out_len != NULL) | 1057 | if (out_len != NULL) |
1057 | *out_len = 0; | 1058 | *out_len = 0; |
@@ -1096,7 +1097,7 @@ asn1_check_tag_cbs(CBS *cbs, size_t *out_len, int *out_tag, uint8_t *out_class, | |||
1096 | return 0; | 1097 | return 0; |
1097 | } | 1098 | } |
1098 | 1099 | ||
1099 | if (tag_number > INT_MAX || CBS_len(cbs) > INT_MAX) { | 1100 | if (tag_number > INT_MAX) { |
1100 | ASN1error(ASN1_R_TOO_LONG); | 1101 | ASN1error(ASN1_R_TOO_LONG); |
1101 | return 0; | 1102 | return 0; |
1102 | } | 1103 | } |