From 2d2fe4244eb554c9f5d3841830d0be3c7e16fb86 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 14 Aug 2018 14:52:49 +0200 Subject: [PATCH] i2d_ASN1_BOOLEAN(): correct error module Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6957) --- crypto/asn1/a_bool.c | 2 +- crypto/asn1/asn1.h | 1 + crypto/asn1/asn1_err.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/asn1/a_bool.c b/crypto/asn1/a_bool.c index 98454f3b40..3bf676eb6f 100644 --- a/crypto/asn1/a_bool.c +++ b/crypto/asn1/a_bool.c @@ -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 { diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 05152924f4..36e79d5ecd 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_BOOLEAN 223 # define ASN1_F_I2D_ASN1_OBJECT 222 # define ASN1_F_I2D_ASN1_SET 188 # define ASN1_F_I2D_ASN1_TIME 160 diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c index 475e80ad12..9e273dcf5f 100644 --- a/crypto/asn1/asn1_err.c +++ b/crypto/asn1/asn1_err.c @@ -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"}, -- 2.25.1