diff options
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_utl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_utl.c b/src/lib/libcrypto/asn1/tasn_utl.c index 4ef4232c7e..e3b2c9e4dc 100644 --- a/src/lib/libcrypto/asn1/tasn_utl.c +++ b/src/lib/libcrypto/asn1/tasn_utl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_utl.c,v 1.14 2022/05/10 05:19:23 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_utl.c,v 1.15 2022/05/12 19:24:38 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 | */ |
@@ -153,7 +153,7 @@ asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it) | |||
153 | 153 | ||
154 | enc = asn1_get_enc_ptr(pval, it); | 154 | enc = asn1_get_enc_ptr(pval, it); |
155 | if (enc) { | 155 | if (enc) { |
156 | free(enc->enc); | 156 | freezero(enc->enc, enc->len); |
157 | enc->enc = NULL; | 157 | enc->enc = NULL; |
158 | enc->len = 0; | 158 | enc->len = 0; |
159 | enc->modified = 1; | 159 | enc->modified = 1; |
@@ -170,7 +170,7 @@ asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, | |||
170 | if (!enc) | 170 | if (!enc) |
171 | return 1; | 171 | return 1; |
172 | 172 | ||
173 | free(enc->enc); | 173 | freezero(enc->enc, enc->len); |
174 | enc->enc = malloc(inlen); | 174 | enc->enc = malloc(inlen); |
175 | if (!enc->enc) | 175 | if (!enc->enc) |
176 | return 0; | 176 | return 0; |