diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 3936ecba63..b88c5f2bc1 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.52 2022/04/27 17:28:34 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.53 2022/04/27 17:56:13 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 | */ |
@@ -774,7 +774,6 @@ asn1_ex_c2i(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) | |||
774 | ASN1_TYPE *typ = NULL; | 774 | ASN1_TYPE *typ = NULL; |
775 | ASN1_INTEGER **tint; | 775 | ASN1_INTEGER **tint; |
776 | ASN1_BOOLEAN *tbool; | 776 | ASN1_BOOLEAN *tbool; |
777 | const uint8_t *p; | ||
778 | uint8_t u8val; | 777 | uint8_t u8val; |
779 | int ret = 0; | 778 | int ret = 0; |
780 | 779 | ||
@@ -840,8 +839,7 @@ asn1_ex_c2i(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) | |||
840 | case V_ASN1_INTEGER: | 839 | case V_ASN1_INTEGER: |
841 | case V_ASN1_ENUMERATED: | 840 | case V_ASN1_ENUMERATED: |
842 | tint = (ASN1_INTEGER **)pval; | 841 | tint = (ASN1_INTEGER **)pval; |
843 | p = CBS_data(content); | 842 | if (!c2i_ASN1_INTEGER_cbs(tint, content)) |
844 | if (!c2i_ASN1_INTEGER(tint, &p, CBS_len(content))) | ||
845 | goto err; | 843 | goto err; |
846 | /* Fixup type to match the expected form */ | 844 | /* Fixup type to match the expected form */ |
847 | (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG); | 845 | (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG); |