[openssl/openssl] 12d40c: Fix error handling in CMS_EncryptedData_encrypt

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


  Branch: refs/heads/openssl-3.3
  Home:   https://github.com/openssl/openssl
  Commit: 12d40c9af546607de5809fc10a211ac7ae4646b3
      https://github.com/openssl/openssl/commit/12d40c9af546607de5809fc10a211ac7ae4646b3
  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