]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
i2d_ASN1_BOOLEAN(): correct error module
authorRichard Levitte <levitte@openssl.org>
Tue, 14 Aug 2018 12:52:49 +0000 (14:52 +0200)
committerMatt Caswell <matt@openssl.org>
Tue, 14 Aug 2018 12:57:51 +0000 (13:57 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6957)

crypto/asn1/a_bool.c
crypto/asn1/asn1.h
crypto/asn1/asn1_err.c

index 98454f3b404d0925f38e93874d1c6eae9cd67574..3bf676eb6fb5351e060e619e68562724552f4671 100644 (file)
@@ -71,7 +71,7 @@ int i2d_ASN1_BOOLEAN(int a, unsigned char **pp)
 
     if (*pp == NULL) {
         if ((p = allocated = OPENSSL_malloc(r)) == NULL) {
-            ASN1err(ASN1_F_I2D_ASN1_OBJECT, ERR_R_MALLOC_FAILURE);
+            ASN1err(ASN1_F_I2D_ASN1_BOOLEAN, ERR_R_MALLOC_FAILURE);
             return 0;
         }
     } else {
index 05152924f4665a788a7aa9630b334c8ae711470b..36e79d5ecd2db7a41113c6305b00e1171f411823 100644 (file)
@@ -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_BOOLEAN                          223
 # define ASN1_F_I2D_ASN1_OBJECT                           222
 # define ASN1_F_I2D_ASN1_SET                              188
 # define ASN1_F_I2D_ASN1_TIME                             160
index 475e80ad128be5ba23a992c774a518c34ac540c1..9e273dcf5f235c7bd7fc5d9e1755d439899879cc 100644 (file)
@@ -168,6 +168,7 @@ static ERR_STRING_DATA ASN1_str_functs[] = {
     {ERR_FUNC(ASN1_F_D2I_X509_PKEY), "d2i_X509_PKEY"},
     {ERR_FUNC(ASN1_F_DO_BUF), "DO_BUF"},
     {ERR_FUNC(ASN1_F_I2D_ASN1_BIO_STREAM), "i2d_ASN1_bio_stream"},
+    {ERR_FUNC(ASN1_F_I2D_ASN1_BOOLEAN), "i2d_ASN1_BOOLEAN"},
     {ERR_FUNC(ASN1_F_I2D_ASN1_OBJECT), "i2d_ASN1_OBJECT"},
     {ERR_FUNC(ASN1_F_I2D_ASN1_SET), "i2d_ASN1_SET"},
     {ERR_FUNC(ASN1_F_I2D_ASN1_TIME), "I2D_ASN1_TIME"},