Skip to content

Commit bf2e778

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents 7638640 + b09be29 commit bf2e778

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ PHP NEWS
6060
- Opcache:
6161
. Fix incorrect page_size check. (nielsdos)
6262

63+
- OpenSSL:
64+
. Fixed php_openssl_set_server_dh_param() DH params errors handling. (nielsdos)
65+
6366
- PDO OCI:
6467
. Fixed bug #60994 (Reading a multibyte CLOB caps at 8192 chars).
6568
(Michael Voříšek)

ext/opcache/ZendAccelerator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ static void accel_move_code_to_huge_pages(void)
30373037
int ret;
30383038

30393039
while (1) {
3040-
ret = fscanf(f, "%lx-%lx %4s %lx %9s %ld %s\n", &start, &end, perm, &offset, dev, &inode, name);
3040+
ret = fscanf(f, "%lx-%lx %4s %lx %9s %lu %s\n", &start, &end, perm, &offset, dev, &inode, name);
30413041
if (ret == 7) {
30423042
if (perm[0] == 'r' && perm[1] == '-' && perm[2] == 'x' && name[0] == '/') {
30433043
long unsigned int seg_start = ZEND_MM_ALIGNED_SIZE_EX(start, huge_page_size);

ext/openssl/xp_ssl.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ static int php_openssl_set_server_dh_param(php_stream * stream, SSL_CTX *ctx) /*
12371237
return FAILURE;
12381238
}
12391239

1240-
if (SSL_CTX_set0_tmp_dh_pkey(ctx, pkey) < 0) {
1240+
if (SSL_CTX_set0_tmp_dh_pkey(ctx, pkey) == 0) {
12411241
php_error_docref(NULL, E_WARNING, "Failed assigning DH params");
12421242
EVP_PKEY_free(pkey);
12431243
return FAILURE;
@@ -1251,7 +1251,7 @@ static int php_openssl_set_server_dh_param(php_stream * stream, SSL_CTX *ctx) /*
12511251
return FAILURE;
12521252
}
12531253

1254-
if (SSL_CTX_set_tmp_dh(ctx, dh) < 0) {
1254+
if (SSL_CTX_set_tmp_dh(ctx, dh) == 0) {
12551255
php_error_docref(NULL, E_WARNING, "Failed assigning DH params");
12561256
DH_free(dh);
12571257
return FAILURE;
@@ -1320,7 +1320,10 @@ static int php_openssl_set_server_specific_opts(php_stream *stream, SSL_CTX *ctx
13201320
php_error_docref(NULL, E_WARNING, "rsa_key_size context option has been removed");
13211321
}
13221322

1323-
php_openssl_set_server_dh_param(stream, ctx);
1323+
if (php_openssl_set_server_dh_param(stream, ctx) == FAILURE) {
1324+
return FAILURE;
1325+
}
1326+
13241327
zv = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "single_dh_use");
13251328
if (zv == NULL || zend_is_true(zv)) {
13261329
ssl_ctx_options |= SSL_OP_SINGLE_DH_USE;

0 commit comments

Comments
 (0)