1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix potential leaks when writing to BIO fails
This commit is contained in:
Niels Dossche
2025-04-11 21:02:59 +02:00
2 changed files with 5 additions and 4 deletions

1
NEWS
View File

@@ -32,6 +32,7 @@ PHP NEWS
- OpenSSL:
. Fix memory leak in openssl_sign() when passing invalid algorithm.
(nielsdos)
. Fix potential leaks when writing to BIO fails. (nielsdos)
- Standard:
. Fixed bug GH-18145 (php8ts crashes in php_clear_stat_cache()).

View File

@@ -5945,8 +5945,8 @@ PHP_FUNCTION(openssl_pkcs7_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -5960,8 +5960,8 @@ PHP_FUNCTION(openssl_pkcs7_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -6586,8 +6586,8 @@ PHP_FUNCTION(openssl_cms_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -6601,8 +6601,8 @@ PHP_FUNCTION(openssl_cms_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}