From 0768ecbc46c069c9198b7cd44c7ce2f0866d968a Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 27 Apr 2022 17:56:13 +0000 Subject: Decode via c2i_ASN1_INTEGER_cbs() from asn1_ex_c2i(). --- src/lib/libcrypto/asn1/tasn_dec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/asn1/tasn_dec.c') 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 @@ -/* $OpenBSD: tasn_dec.c,v 1.52 2022/04/27 17:28:34 jsing Exp $ */ +/* $OpenBSD: tasn_dec.c,v 1.53 2022/04/27 17:56:13 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -774,7 +774,6 @@ asn1_ex_c2i(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) ASN1_TYPE *typ = NULL; ASN1_INTEGER **tint; ASN1_BOOLEAN *tbool; - const uint8_t *p; uint8_t u8val; int ret = 0; @@ -840,8 +839,7 @@ asn1_ex_c2i(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) case V_ASN1_INTEGER: case V_ASN1_ENUMERATED: tint = (ASN1_INTEGER **)pval; - p = CBS_data(content); - if (!c2i_ASN1_INTEGER(tint, &p, CBS_len(content))) + if (!c2i_ASN1_INTEGER_cbs(tint, content)) goto err; /* Fixup type to match the expected form */ (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG); -- cgit v1.2.3-55-g6feb