[openssl/openssl] a0f6e1: Fix error handling in CMS_EncryptedData_encrypt

Bernd Edlinger noreply at github.com
Mon May 6 08:16:03 UTC 2024


  Branch: refs/heads/openssl-3.2
  Home:   https://github.com/openssl/openssl
  Commit: a0f6e1f26287280b2961f6bab7addb7a5ad45c1e
      https://github.com/openssl/openssl/commit/a0f6e1f26287280b2961f6bab7addb7a5ad45c1e
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
    M crypto/cms/cms_asn1.c
    M crypto/cms/cms_env.c
    M crypto/cms/cms_lib.c
    M crypto/cms/cms_local.h
    M crypto/cms/cms_sd.c
    M crypto/cms/cms_smime.c
    M test/recipes/80-test_cms.t

  Log Message:
  -----------
  Fix error handling in CMS_EncryptedData_encrypt

That caused several memory leaks in case of error.
Also when the CMS object that is created by CMS_EncryptedData_encrypt
is not used in the normal way, but instead just deleted
by CMS_ContentInfo_free some memory was lost.

Fixes #21985

Reviewed-by: Todd Short <todd.short at me.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22031)

(cherry picked from commit 6d2a01cdfb56fdb8ea5d5dd417724e6906c8b8e2)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list