diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 3a27b82288..70dc355ca1 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.36 2018/09/17 18:18:01 tb Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.37 2019/04/01 15:48:04 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 | */ |
| @@ -793,14 +793,17 @@ asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, | |||
| 793 | ASN1_VALUE **opval = NULL; | 793 | ASN1_VALUE **opval = NULL; |
| 794 | ASN1_STRING *stmp; | 794 | ASN1_STRING *stmp; |
| 795 | ASN1_TYPE *typ = NULL; | 795 | ASN1_TYPE *typ = NULL; |
| 796 | int ret = 0; | ||
| 797 | const ASN1_PRIMITIVE_FUNCS *pf; | ||
| 798 | ASN1_INTEGER **tint; | 796 | ASN1_INTEGER **tint; |
| 797 | int ret = 0; | ||
| 799 | 798 | ||
| 800 | pf = it->funcs; | 799 | if (it->funcs != NULL) { |
| 800 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; | ||
| 801 | 801 | ||
| 802 | if (pf && pf->prim_c2i) | 802 | if (pf->prim_c2i == NULL) |
| 803 | return 0; | ||
| 803 | return pf->prim_c2i(pval, cont, len, utype, free_cont, it); | 804 | return pf->prim_c2i(pval, cont, len, utype, free_cont, it); |
| 805 | } | ||
| 806 | |||
| 804 | /* If ANY type clear type and set pointer to internal value */ | 807 | /* If ANY type clear type and set pointer to internal value */ |
| 805 | if (it->utype == V_ASN1_ANY) { | 808 | if (it->utype == V_ASN1_ANY) { |
| 806 | if (!*pval) { | 809 | if (!*pval) { |
