aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/asn1_locl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-10-02 14:13:40 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-10-17 14:34:00 +0100
commit6215f27a83c6b9089a217dd6deab1665e0ced516 (patch)
tree7385937a786ba409f7ef88146fd272edc279ade1 /crypto/asn1/asn1_locl.h
parentba6017a19346a169ca09bb67427ccf6fc56af0af (diff)
downloadopenssl-6215f27a83c6b9089a217dd6deab1665e0ced516.zip
openssl-6215f27a83c6b9089a217dd6deab1665e0ced516.tar.gz
openssl-6215f27a83c6b9089a217dd6deab1665e0ced516.tar.bz2
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/asn1_locl.h')
-rw-r--r--crypto/asn1/asn1_locl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_locl.h
index 56c9954..5f597bd 100644
--- a/crypto/asn1/asn1_locl.h
+++ b/crypto/asn1/asn1_locl.h
@@ -45,6 +45,8 @@ DEFINE_STACK_OF(MIME_HEADER)
/* Month values for printing out times */
extern const char *_asn1_mon[12];
+void asn1_string_embed_free(ASN1_STRING *a, int embed);
+
int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_set_choice_selector(ASN1_VALUE **pval, int value,
const ASN1_ITEM *it);
@@ -63,7 +65,7 @@ int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval,
int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
const ASN1_ITEM *it);
-void asn1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
+void asn1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed);
void asn1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,