diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-10-02 14:13:40 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-10-17 14:34:00 +0100 |
commit | 6215f27a83c6b9089a217dd6deab1665e0ced516 (patch) | |
tree | 7385937a786ba409f7ef88146fd272edc279ade1 /crypto/asn1/a_type.c | |
parent | ba6017a19346a169ca09bb67427ccf6fc56af0af (diff) |
Fix embedded string handling.
Don't rely on embedded flag to free strings correctly: it wont be
set if there is a malloc failure during initialisation.
Thanks to Guido Vranken for reporting this issue.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1725)
Diffstat (limited to 'crypto/asn1/a_type.c')
-rw-r--r-- | crypto/asn1/a_type.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c index 42dbcbfffc..df42360e76 100644 --- a/crypto/asn1/a_type.c +++ b/crypto/asn1/a_type.c @@ -25,7 +25,7 @@ void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value) { if (a->value.ptr != NULL) { ASN1_TYPE **tmp_a = &a; - asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL); + asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL, 0); } a->type = type; if (type == V_ASN1_BOOLEAN) |