From omega8cc/boa (5.x-dev, aegir/patches/php-sec): php-5.6.40-openssl3-pkey-export.patch, php-5.6.40-round-places-overflow.patch, php-5.6.40-sury-105.patch, php-5.6.40-xlts-1.patch, php-5.6.40-xlts-2.patch. sury-105 contains the 5.6 backport of the CVE-2026-109618/109619 fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
610 B
Diff
23 lines
610 B
Diff
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
|
|
index af376aa..5116a4a 100644
|
|
--- a/ext/openssl/openssl.c
|
|
+++ b/ext/openssl/openssl.c
|
|
@@ -4001,6 +4001,9 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
|
|
|
|
if (PHP_SSL_REQ_PARSE(&req, args) == SUCCESS) {
|
|
bio_out = BIO_new_file(filename, "w");
|
|
+ if (bio_out == NULL) {
|
|
+ goto clean_exit;
|
|
+ }
|
|
|
|
if (passphrase && req.priv_key_encrypt) {
|
|
if (req.priv_key_encrypt_cipher) {
|
|
@@ -4029,6 +4032,7 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
|
|
RETVAL_TRUE;
|
|
}
|
|
}
|
|
+clean_exit:
|
|
PHP_SSL_REQ_DISPOSE(&req);
|
|
|
|
if (key_resource == -1 && key) {
|