[openssl/openssl] 1c0782: Fix a possible memory leak in do_othername

Bernd Edlinger noreply at github.com
Tue Dec 12 12:45:54 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 1c078212f1548d7f647a1f0f12ed6df257c85cc3
      https://github.com/openssl/openssl/commit/1c078212f1548d7f647a1f0f12ed6df257c85cc3
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M crypto/x509/v3_san.c
    M test/recipes/25-test_req.t

  Log Message:
  -----------
  Fix a possible memory leak in do_othername

Since the gen->type will not be set in a2i_GENERAL_NAME
the gen->d.otherName will not be automatically
cleaned up by GENERAL_NAME_free.
Also fixed a similar leak in a2i_GENERAL_NAME,
where ASN1_STRING_set may fail but gen->d.ia5
will not be automatically cleaned up.

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22996)




More information about the openssl-commits mailing list