openssl/crypto/cms
James Muir 83efd7170b free oaep label-octet-string on error
When successful, ossl_X509_ALGOR_from_nid() returns a pointer to an
X509_ALGOR object.  Inside ossl_X509_ALGOR_from_nid(),
X509_ALGOR_set0() is called, and this passes ownership of the ASN1
object "los" (label octet string) to the X509_ALGOR object.  When
ossl_X509_ALGOR_from_nid() fails, ownership has not been passed on and
we need to free "los".

Change the scope of "los" and ensure it is freed on failure (on
success, set it to NULL so it is not freed inside the function).

Fixes #22336

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22495)
2023-10-30 07:59:06 +00:00
..
build.info
cms_asn1.c crypto: Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:01 +11:00
cms_att.c
cms_cd.c Convert ZLIB defines to OPENSSL_NO_ZLIB 2022-10-18 09:30:21 -04:00
cms_dd.c
cms_dh.c Copyright year updates 2023-09-07 09:59:15 +01:00
cms_ec.c Copyright year updates 2023-09-07 09:59:15 +01:00
cms_enc.c cms_enc.c: Include crypto/asn1.h for struct asn1_object_st 2023-10-19 10:15:56 +02:00
cms_env.c Copyright year updates 2023-09-07 09:59:15 +01:00
cms_err.c CMS_add1_signer(): add missing ERR_raise() calls 2023-10-17 22:02:29 +02:00
cms_ess.c
cms_io.c
cms_kari.c
cms_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
cms_local.h Copyright year updates 2023-09-07 09:59:15 +01:00
cms_pwri.c
cms_rsa.c free oaep label-octet-string on error 2023-10-30 07:59:06 +00:00
cms_sd.c CMS and PKCS7: fix handlling of EVP_PKEY_get_size() failure 2023-10-26 16:03:48 +01:00
cms_smime.c Copyright year updates 2023-09-07 09:59:15 +01:00