summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/asn1.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-08-11 09:59:20 +0200
committerRichard Levitte <levitte@openssl.org>2018-08-11 12:38:46 +0200
commit0971432f6f6d8b40d797133621809bd31eb7bf4e (patch)
tree03ae6e302e557027c121c126854f6733c7a024c9 /crypto/asn1/asn1.h
parentec3f996b3066ecaaec87ba5ad29c606aeac0740d (diff)
i2d_ASN1_OBJECT(): allocate memory if the user didn't provide a buffer
Since 0.9.7, all i2d_ functions were documented to allocate an output buffer if the user didn't provide one, under these conditions (from the 1.0.2 documentation): For OpenSSL 0.9.7 and later if B<*out> is B<NULL> memory will be allocated for a buffer and the encoded data written to it. In this case B<*out> is not incremented and it points to the start of the data just written. i2d_ASN1_OBJECT was found not to do this, and would crash if a NULL output buffer was provided. Fixes #6914 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/6918) (cherry picked from commit 6114041540d8d1fecaf23a861788c3c742d3b467)
Diffstat (limited to 'crypto/asn1/asn1.h')
-rw-r--r--crypto/asn1/asn1.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index 256c531811..05152924f4 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -1267,6 +1267,7 @@ void ERR_load_ASN1_strings(void);
# define ASN1_F_D2I_X509_PKEY 159
# define ASN1_F_DO_BUF 221
# define ASN1_F_I2D_ASN1_BIO_STREAM 211
+# define ASN1_F_I2D_ASN1_OBJECT 222
# define ASN1_F_I2D_ASN1_SET 188
# define ASN1_F_I2D_ASN1_TIME 160
# define ASN1_F_I2D_DSA_PUBKEY 161