diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index dd350070f7..23a6740115 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.28 2015/12/04 04:19:25 beck Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.29 2015/12/12 21:05:11 beck 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 | */ |
| @@ -676,6 +676,10 @@ asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in, long inlen, | |||
| 676 | const unsigned char *cont = NULL; | 676 | const unsigned char *cont = NULL; |
| 677 | long len; | 677 | long len; |
| 678 | 678 | ||
| 679 | buf.length = 0; | ||
| 680 | buf.max = 0; | ||
| 681 | buf.data = NULL; | ||
| 682 | |||
| 679 | if (!pval) { | 683 | if (!pval) { |
| 680 | ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_ILLEGAL_NULL); | 684 | ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_ILLEGAL_NULL); |
| 681 | return 0; /* Should never happen */ | 685 | return 0; /* Should never happen */ |
| @@ -753,9 +757,6 @@ asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in, long inlen, | |||
| 753 | buf.data = NULL; | 757 | buf.data = NULL; |
| 754 | } | 758 | } |
| 755 | } else if (cst) { | 759 | } else if (cst) { |
| 756 | buf.length = 0; | ||
| 757 | buf.max = 0; | ||
| 758 | buf.data = NULL; | ||
| 759 | /* Should really check the internal tags are correct but | 760 | /* Should really check the internal tags are correct but |
| 760 | * some things may get this wrong. The relevant specs | 761 | * some things may get this wrong. The relevant specs |
| 761 | * say that constructed string types should be OCTET STRINGs | 762 | * say that constructed string types should be OCTET STRINGs |
