Commit 1b7449f733b for php.net

commit 1b7449f733bdf542283019f477454686ed05bba8
Merge: 0ef031fc28f 31995007813
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Sat Apr 4 12:45:57 2026 +0200

    Merge branch 'PHP-8.5'

    * PHP-8.5:
      Add missing error check on SSL_set_ex_data()
      Fix UB and error propagation when X509_gmtime_adj() fails
      Fix memory leaks when BN_bin2bn() fails
      Add missing error check on BN_CTX_new()

diff --cc ext/openssl/openssl_backend_v1.c
index 07d414ab88a,13aab24c3ff..b1f95cdb48b
--- a/ext/openssl/openssl_backend_v1.c
+++ b/ext/openssl/openssl_backend_v1.c
@@@ -140,8 -140,15 +140,15 @@@ static bool php_openssl_pkey_init_dsa_d
  	OPENSSL_PKEY_SET_BN(data, p);
  	OPENSSL_PKEY_SET_BN(data, q);
  	OPENSSL_PKEY_SET_BN(data, g);
- 	if (!p || !q || !g || !DSA_set0_pqg(dsa, p, q, g)) {
+ 	if (!p || !q || !g) {
+ 		BN_free(p);
+ 		BN_free(q);
+ 		BN_free(g);
 -		return 0;
++		return false;
+ 	}
+
+ 	if (!DSA_set0_pqg(dsa, p, q, g)) {
 -		return 0;
 +		return false;
  	}

  	OPENSSL_PKEY_SET_BN(data, pub_key);